Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 11th, 2008, 03:34 PM
Authorized User
Join Date: Feb 2007
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query in a browser/address bar i.e. default.aspx?i

I have a database with a picture id and URL's to pictures e.g.

l_pictureID l_picture1 l_picture2

001 england.jpg spain.jpg
002 kenya.jpg zambia.jpg

 As well as that I have a page e.g. default.aspx that has Image1 and Image2 that can be change according to image1.imageURL = .... etc

Is there a way I can run a query from the address bar to say e.g. localhost/default.aspx?l_pictureID=001 and it will change the URL of image1 and image2 on the page ???

http://forums.asp.net/AddPost.aspx?ForumID=27 - this is an example of how it is used on this website.

As you can tell im a bit of a newbie and I dont even know what the method/actual correct term for such an operation is.

 Any help will be greatly appreciated


Old June 12th, 2008, 07:58 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

I believe you are asking about the "query string" of the URL.

In this example:


the query string is this part of it:


Using that, you can get the value like this:
   Request.QueryString["l_pictureID"];  //C#
   Request.QueryString("l_pictureID")   'VB.NET
Then you can do as you need with the database query to actually get the picture and assign the values to the images.


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add image in url address bar? saurabh ASP.NET 3.5 Professionals 1 July 11th, 2008 05:53 AM
display querystring in address bar europhreak Classic ASP Basics 1 February 16th, 2006 01:43 PM
Launch default browser in a new browser window haiying Beginning VB 6 1 August 30th, 2005 05:48 PM
How do disable Menu bar & address bar for browser bekim HTML Code Clinic 2 January 7th, 2005 12:33 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.