I used
Session["EmpName"] = Convert.ToString(Request.QueryString[1]);
lblEmployeeName.Text = Session["EmpName"].ToString;
to show the data in label from session but it shows following error:
Cannot Convert Method Group ‘ToString’ to non-delegate type ‘string’.
Tell me any solution…
should be:
even better would be, (this will not crash if the Session[“EmpName”] is null):
An extra note:
You should look for a specific value, you can’t be sure of the order from the QueryString values! And the Request.QueryString[1] returns a string. No need for convert.