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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing multiple values in querystring

Status
Not open for further replies.

bassguy

Programmer
Jun 21, 2001
336
US
Hello all, I have used ASP Classic for many years but am new to asp.net and cannot figure out what should be a relatively simple problem. I am hopefull you can help.

I have a datagrid bound to a dataset.
I have the first column as a hyperlink column showing the Department name and using DataNavigateUrlField passing the department ID to the next web page. This works fine in that I get a link like this:

webform2.aspx?pk_Department=3


I would like to pass the Department name along with the ID to the next page to give me the following link:


webform2.aspx?pk_Department=3&department=Finance


Is there a way to have more than one parameter in the querystring?

Is there a better way to get data from one page to another in asp.net?

any help would be appreciated

bassguy

 
the only thing I can think of is using a server side method such as:
Code:
<% buildURL(Container.DataItem(&quot;field1&quot;), Container.DataItem(&quot;field2&quot;)) %>

buildURL could build the URL for you and return the string or have it actually set the hyperlink navigateurl, rather than datanavigateurlfield.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top