I have images which I am using to navigate to next page using href:-
<a class="ajaxcolorbox" href="User.aspx" id="abc">
<a class="ajaxcolorbox" href="User.aspx" id="xyz">
Now I am want to pass some values so that I can display on some information depending on which image user has clicked.
var id = Request.QueryString["id"];
if (id == Request.QueryString["abc"])
{
Label1.Text = "abc";
}
if (id == Request.QueryString["xyz"])
{
Label1.Text = "xyz";
}
But not getting expected result.
Pass those on the querystring
Your if condition seems to be a bit wrong to me. Do this
Or if you are simply showing whatever comes in the querystring , you can do like this