if you please help me out i am trying to pass 3 different parameters in a page but i am new in asp.net C# and i don’t know the correct syntax if you please help me out
;
For one parameter like this it works:
Response.Redirect("~/WebPage2.aspx?q=" + ListBox1.SelectedValue);
how can i write it for 3 parameters like this don’t seem to work?
Response.Redirect("~/WebPage2.aspx?q=" + ListBox1.SelectedValue+"&cr="+ListBox3.SelectedValue+"&p="+ListBox1.SelectedValue)
thanks in advance
You forgot a
+in your string concatenations after thecrparameter. This being said a far safer and better approach which ensures that your parameters are properly encoded is the following:And of course if you are using ASP.NET MVC (as you’ve tagged your question with it) you would use:
I very sincerely hope that if you are using ASP.NET MVC then
ListBox1andListBox2is not what I think it is.