about querystring in.net

Jan 6 2011 1:42 AM

hai
      in asp.net can i able to pass the query string with in the  page.likewise
in first.aspx
<a href="first.aspx?str=role">BY Role</a>
in first.aspx.cs
string str1
str1=Request.QueryString["str"].ToString(); 
//when i use like this object referene not set to an instance of an object error will eccor how can i solve this.
Thank u
 

Answers (3)