views:

355

answers:

1

Hi all,

I tried to pass more than one value through Query String from page1.aspx to page2.aspx.

This is my Query string in the Grid View

<a href="javascript:void(0);" onclick='javascript:window.open("Update.aspx?Regno= <%#Eval ("ID") %>'+ ","'&Fn=<%#Eval ("FIRSTNAME") %>' +", "'&Ln=<%#Eval ("LASTNAME") %>'")';>
                    Edit</a>

On My Page2.aspx, my code behind on PageLoad is:

if (Page.IsPostBack) return;
            string id = Request.QueryString["ID"];
            string Firstname = Request.QueryString["FIRSTNAME"];
            string LastName = Request.QueryString["LASTNAME"];

My Visual Studio IDE shows a syntax error on this query string. I dont know the exact way to pass multiple values through Query String. How to make it work? Can anyone pls help me on this..

Which is the right syntax to pass multiple query string?

A: 

You use the & to seperate multiple query string cars. For example, Foo=12&first=death

Tom Cabanski
Googler