Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
02-07-2012, 03:45 PM #1
- Join Date
- Jan 2012
- Thanked 0 Times in 0 Posts
How do i DISPLAY a variable on an ASPX.NET page that was passed from a URL
Hi, I have situation here that works in Coldfusion bout does NOT work here in ASP.NET... Please HELP... How do i DISPLAY a variable on an ASPX.NET page that was passed from a URL, i.e.
1. URL and variable:
a) [<a href="search/ccSearch.aspx?countryName=mycountry&countryID=2">selected country</a>]
b) [OR, <a ID="3" href="search/ccSearch.aspx">country link</a>]
2. What would be the OUTPUT code on the asp.net page for the above?
x) say, for (a) above i wanted to display the country name on the on the destination page... <%# url.countryName %> [what would be the answer because that does not work... it would work for CFM but not here].
y) also, (a) or (b) above... if i wanted to use the IDs to pull data from a database how would i do that? For example: [SELECT * FROM myDatabase WHERE myDatabaseID=<%# URL.ID %>] would that work? OR "WHERE myDatabaseID=<%# URL.countryID %>"
thats it.... thanks for the help!!!