raj
raj

Reputation: 3

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 matched 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

Upvotes: 0

Views: 306

Answers (1)

Neil Knight
Neil Knight

Reputation: 48537

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.

Upvotes: 1

Related Questions