Hi,
When you click to download:
protected void LinkButton10_Click(object sender, EventArgs e)
you make a redirect to
Download.aspx without any additional options.
Then you have the following line of code where you get the error:
string fileName = Request.QueryString["name"].ToString();
Because the query string is not being passed.
You need to get a url like this: http://localhost/Download.aspx?name=filename.ext, when you are getting a url like this: http://localhost/Download.aspx