Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > error "declaration expected" for (Response.ContentType = "application/pdf")

Reply
Thread Tools

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

 
 
TJS
Guest
Posts: n/a
 
      11-18-2003
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 ???




 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      11-18-2003
System.Web.HttpContext.Current.Response.Write is it's full name


--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"TJS" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 ???
>
>
>
>



 
Reply With Quote
 
 
 
 
TJS
Guest
Posts: n/a
 
      11-18-2003
I added this

System.Web.HttpContext.Current.Response.ContentTyp e = "application/pdf"

but it still throws the same error message


"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:%(E-Mail Removed)...
> System.Web.HttpContext.Current.Response.Write is it's full name
>
>
> --
>
>
> -----------
> Got TidBits?
> Get it here: www.networkip.net/tidbits
> "TJS" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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 ???
> >
> >
> >
> >

>
>



 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      11-18-2003
That's very wierd to me.
[snip]
i copied this into my project
System.Web.HttpContext.Current.Response.ContentTyp e = "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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I added this
>
> System.Web.HttpContext.Current.Response.ContentTyp e = "application/pdf"
>
> but it still throws the same error message
>
>
> "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
> message news:%(E-Mail Removed)...
> > System.Web.HttpContext.Current.Response.Write is it's full name
> >
> >
> > --
> >
> >
> > -----------
> > Got TidBits?
> > Get it here: www.networkip.net/tidbits
> > "TJS" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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 ???
> > >
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
TJS
Guest
Posts: n/a
 
      11-18-2003
I rebooted and I have it working now.
maybe something was cached ???



"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:%(E-Mail Removed)...
> That's very wierd to me.
> [snip]
> i copied this into my project
> System.Web.HttpContext.Current.Response.ContentTyp e = "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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I added this
> >
> > System.Web.HttpContext.Current.Response.ContentTyp e = "application/pdf"
> >
> > but it still throws the same error message
> >
> >
> > "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote

in
> > message news:%(E-Mail Removed)...
> > > System.Web.HttpContext.Current.Response.Write is it's full name
> > >
> > >
> > > --
> > >
> > >
> > > -----------
> > > Got TidBits?
> > > Get it here: www.networkip.net/tidbits
> > > "TJS" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > 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 ???
> > > >
> > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      11-19-2003
No, it was the phase of the moon

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"TJS" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I rebooted and I have it working now.
> maybe something was cached ???
>
>
>
> "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
> message news:%(E-Mail Removed)...
> > That's very wierd to me.
> > [snip]
> > i copied this into my project
> > System.Web.HttpContext.Current.Response.ContentTyp e = "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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I added this
> > >
> > > System.Web.HttpContext.Current.Response.ContentTyp e =

"application/pdf"
> > >
> > > but it still throws the same error message
> > >
> > >
> > > "Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote

> in
> > > message news:%(E-Mail Removed)...
> > > > System.Web.HttpContext.Current.Response.Write is it's full name
> > > >
> > > >
> > > > --
> > > >
> > > >
> > > > -----------
> > > > Got TidBits?
> > > > Get it here: www.networkip.net/tidbits
> > > > "TJS" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > 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 ???
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 ASP .Net 2 03-27-2006 08:43 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error JavaQueries Java 1 03-01-2005 06:30 PM



Advertisments