Z
Zeba
Hi ....
I'm always getting stuck with null reference exceptions !
Can you tell me what's wrong with my code given below ? I'm getting
the error that reference is not set to an instance of an object.
protected void Page_Load(object sender, EventArgs e)
{
String myItem;
if (Request.QueryString["Item"].ToString() != null)
{
myItem = Request.QueryString["Item"].ToString();
Label1.Text = myItem;
}
else
{
Label1.Text = "none";
}
}
Thanks !
I'm always getting stuck with null reference exceptions !
Can you tell me what's wrong with my code given below ? I'm getting
the error that reference is not set to an instance of an object.
protected void Page_Load(object sender, EventArgs e)
{
String myItem;
if (Request.QueryString["Item"].ToString() != null)
{
myItem = Request.QueryString["Item"].ToString();
Label1.Text = myItem;
}
else
{
Label1.Text = "none";
}
}
Thanks !