compare the data passed in query string
sir i m working on a project and i want to pass a value in query string and redirect it to next page .....ok now on next page i want to make a check on this if the value of querystring is equal to a particular value then a message show.... i have done upto here now the prob comes if the values is not ma开发者_开发技巧tched the code written in else is not working i m writting my code:-----
if(request.param.count>0) then
label1.visible="true"
label1.text="hello"
else
label1.visible=false
Something like the following will test your QueryString
to a string
value.
If (Request.QueryString("MyString") == "hello") Then
label1.Text = "Hello";
label1.Visible = true;
Else
label1.Visible = false;
End If
In your code, you had "
's around the true
and false
values. You don't need these.
精彩评论