Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display the value of a QueryStringParameter in my ListView

Status
Not open for further replies.

stinkybee

Programmer
May 15, 2001
218
0
0
GB
This sounds as though it should be very simple but after hours of searching I cannot find an answer. All I need to do is display the value of a querystring from a QueryStringParameter in the ItemTemplate of my ListView. For example, I have this QueryStringParameter in my datasource

Code:
<asp:QueryStringParameter Name="category_id" DbType = "int32" Direction = "Input" QueryStringField="category_id" DefaultValue="-1" />

Now I need to display the value of the "category_id" querystring in my ListView. Any idea how I could do this?

Thanks

Web Development Manager
 
All you need to do is access the querystring collection and get the value you want. You can put it in your listview markup:
Code:
<%= Request.QueryString("category_id")%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top