Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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

Thanks

Reply With Quote
  #2 (permalink)  
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
Default

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

In this example:

   localhost/default.aspx?l_pictureID=001

the query string is this part of it:

   l_pictureID=001

Using that, you can get the value like this:
Code:
   Request.QueryString["l_pictureID"];  //C#
or
   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.

-Peter
compiledthoughts.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:24 AM.


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