QueryString Question

G

Guest

I have an ASP.NET code example I am trying to use:

Within an asp repeater item template in Master.aspx:
<a href='<%# String.Format( "details.aspx?id={0}", Container.DataItem( "EmployeeID") ) %>'><%#
Container.DataItem("LastName") %></a>

In Details.aspx:
Dim intEmployeeID As Integer
intEmployeeID = Int32.Parse(Request.QueryString( "id" ) )

This works great for passing the EmployeeID. I also want to use the value in "LastName" in Details.aspx, but I can't figure out how to get it from the QueryString (assuming it is even a part of it). Any suggestions?

Thank you,
Judy
 
L

Lau Lei Cheong

You can pass the parameters like "details.aspx?id={0}&lastid={1}"

Then you can get "lastid" by Request.QueryString().

Note: This is the format you'll see if you submit a form with method="get".

Judy Ward said:
I have an ASP.NET code example I am trying to use:

Within an asp repeater item template in Master.aspx:
<a href='<%# String.Format( "details.aspx?id={0}", Container.DataItem( "EmployeeID") ) %>'><%#
Container.DataItem("LastName") %></a>

In Details.aspx:
Dim intEmployeeID As Integer
intEmployeeID = Int32.Parse(Request.QueryString( "id" ) )

This works great for passing the EmployeeID. I also want to use the value
in "LastName" in Details.aspx, but I can't figure out how to get it from the
QueryString (assuming it is even a part of it). Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top