error "declaration expected" for (Response.ContentType = "application/pdf")

T

TJS

trying to display pdf file in browser
fails on this line:
Response.ContentType = "application/pdf"

getting an error about no declaration found for "response"

what declaration is needed ???
 
T

TJS

I added this

System.Web.HttpContext.Current.Response.ContentType = "application/pdf"

but it still throws the same error message
 
A

Alvin Bruney

That's very wierd to me.
[snip]
i copied this into my project
System.Web.HttpContext.Current.Response.ContentType = "application/pdf";

and it compiled fine. you have some other error somewhere. comment out that
line and recompile see what the issue is.
 
T

TJS

I rebooted and I have it working now.
maybe something was cached ???



Alvin Bruney said:
That's very wierd to me.
[snip]
i copied this into my project
System.Web.HttpContext.Current.Response.ContentType = "application/pdf";

and it compiled fine. you have some other error somewhere. comment out that
line and recompile see what the issue is.


--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
TJS said:
I added this

System.Web.HttpContext.Current.Response.ContentType = "application/pdf"

but it still throws the same error message


message news:%[email protected]...
 
A

Alvin Bruney

No, it was the phase of the moon :)

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
TJS said:
I rebooted and I have it working now.
maybe something was cached ???



Alvin Bruney said:
That's very wierd to me.
[snip]
i copied this into my project
System.Web.HttpContext.Current.Response.ContentType = "application/pdf";

and it compiled fine. you have some other error somewhere. comment out that
line and recompile see what the issue is.


--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
TJS said:
I added this

System.Web.HttpContext.Current.Response.ContentType = "application/pdf"

but it still throws the same error message


message System.Web.HttpContext.Current.Response.Write is it's full name


--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
trying to display pdf file in browser
fails on this line:
Response.ContentType = "application/pdf"

getting an error about no declaration found for "response"

what declaration is needed ???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top