V
vbMark
My code in the convert.aspx.cs page:
private void Page_Load(object sender, System.EventArgs e)
{
string sFile = Request.QueryString["File"];
if (sFile.Length > 0) <--- Error here.
{
Response.Write(sFile);
}
else
{
Response.Write("No file");
}
}
Causes
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
If I take out the "if" statement and just put
Response.Write(sFile);
Then it works fine. What is causing this error?
Thanks!
private void Page_Load(object sender, System.EventArgs e)
{
string sFile = Request.QueryString["File"];
if (sFile.Length > 0) <--- Error here.
{
Response.Write(sFile);
}
else
{
Response.Write("No file");
}
}
Causes
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
If I take out the "if" statement and just put
Response.Write(sFile);
Then it works fine. What is causing this error?
Thanks!