Steve7423
asked on
The name 'response' does not exist in the current context
Im using the following snipet
httpContext.Current.Respon se.Clear() ;
string FileName = Server.MapPath("/downloads /Resume.do c");
Response.ContentType = "application/octet-stream" ;
Response.AddHeader("Conten t-Disposit ion", "attachment; filename=" & FileName);
Response.Flush();
Response.WriteFile(sSource Url);
I can't seem to find much info on the response object, primarily the basis behind the error: The name 'response' does not exist in the current context
httpContext.Current.Respon
string FileName = Server.MapPath("/downloads
Response.ContentType = "application/octet-stream"
Response.AddHeader("Conten
Response.Flush();
Response.WriteFile(sSource
I can't seem to find much info on the response object, primarily the basis behind the error: The name 'response' does not exist in the current context
ASKER
I changed the flush as you stated. I suspect the problem is an object reference. does the response object require declarations?
Ive tried httpcontext.current.respon se.context type and the httpcontext comes up with the same error.
I'm taking this method from other posts on EE as well as out of a book. unfortunately things aren't explained well.
Ive tried httpcontext.current.respon
I'm taking this method from other posts on EE as well as out of a book. unfortunately things aren't explained well.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I bet it's nothing to do with the response object and more to do with whate ever this is "sSourceUrl"
Could you post the code where you implement this?
and no the response object won't need any implementation as such
apb2
Could you post the code where you implement this?
and no the response object won't need any implementation as such
apb2
Why are you flushing the buffers before you write the source
string FileName = Server.MapPath("/downloads
Response.ContentType = "application/octet-stream"
Response.AddHeader("Conten
Response.WriteFile(sSource
Response.Flush();
Try that
apb2