I want to pass more than one variable to other web pages.
I try this code
string adi = TaskGridView.SelectedRow.Cells[3].Text;
string soyadi = TaskGridView.SelectedRow.Cells[3].Text;
Response.Redirect("Default2.aspx?adi=" + adi);
Response.Redirect("Default2.aspx?soyadi=" + adi);
but it doesnt work how can I do?
The safest way is to use
String.Format()withServer.UrlEncode():This will ensure that the querystring values will not be broken if there is an ampersand (
&) for example, in the value.Then on
Default2.aspxyou can access the values like: