473,543 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error "declaratio n expected" for (Response.Conte ntType = "applicatio n/pdf")

TJS
trying to display pdf file in browser
fails on this line:
Response.Conten tType = "applicatio n/pdf"

getting an error about no declaration found for "response"

what declaration is needed ???


Nov 18 '05 #1
5 4945
System.Web.Http Context.Current .Response.Write is it's full name
--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"TJS" <no****@here.co m> wrote in message
news:un******** ******@tk2msftn gp13.phx.gbl...
trying to display pdf file in browser
fails on this line:
Response.Conten tType = "applicatio n/pdf"

getting an error about no declaration found for "response"

what declaration is needed ???

Nov 18 '05 #2
TJS
I added this

System.Web.Http Context.Current .Response.Conte ntType = "applicatio n/pdf"

but it still throws the same error message
"Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote in
message news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
System.Web.Http Context.Current .Response.Write is it's full name
--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"TJS" <no****@here.co m> wrote in message
news:un******** ******@tk2msftn gp13.phx.gbl...
trying to display pdf file in browser
fails on this line:
Response.Conten tType = "applicatio n/pdf"

getting an error about no declaration found for "response"

what declaration is needed ???


Nov 18 '05 #3
That's very wierd to me.
[snip]
i copied this into my project
System.Web.Http Context.Current .Response.Conte ntType = "applicatio n/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" <no****@here.co m> wrote in message
news:uC******** ******@tk2msftn gp13.phx.gbl...
I added this

System.Web.Http Context.Current .Response.Conte ntType = "applicatio n/pdf"

but it still throws the same error message
"Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote in
message news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
System.Web.Http Context.Current .Response.Write is it's full name
--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"TJS" <no****@here.co m> wrote in message
news:un******** ******@tk2msftn gp13.phx.gbl...
trying to display pdf file in browser
fails on this line:
Response.Conten tType = "applicatio n/pdf"

getting an error about no declaration found for "response"

what declaration is needed ???



Nov 18 '05 #4
TJS
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:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
That's very wierd to me.
[snip]
i copied this into my project
System.Web.Http Context.Current .Response.Conte ntType = "applicatio n/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" <no****@here.co m> wrote in message
news:uC******** ******@tk2msftn gp13.phx.gbl...
I added this

System.Web.Http Context.Current .Response.Conte ntType = "applicatio n/pdf"

but it still throws the same error message
"Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote in message news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
System.Web.Http Context.Current .Response.Write is it's full name
--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"TJS" <no****@here.co m> wrote in message
news:un******** ******@tk2msftn gp13.phx.gbl...
> trying to display pdf file in browser
> fails on this line:
> Response.Conten tType = "applicatio n/pdf"
>
> getting an error about no declaration found for "response"
>
> what declaration is needed ???
>
>
>
>



Nov 18 '05 #5
No, it was the phase of the moon :-)

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"TJS" <no****@here.co m> wrote in message
news:eM******** ******@TK2MSFTN GP12.phx.gbl...
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:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
That's very wierd to me.
[snip]
i copied this into my project
System.Web.Http Context.Current .Response.Conte ntType = "applicatio n/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" <no****@here.co m> wrote in message
news:uC******** ******@tk2msftn gp13.phx.gbl...
I added this

System.Web.Http Context.Current .Response.Conte ntType = "applicatio n/pdf"
but it still throws the same error message
"Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote in message news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
> System.Web.Http Context.Current .Response.Write is it's full name
>
>
> --
>
>
> -----------
> Got TidBits?
> Get it here: www.networkip.net/tidbits
> "TJS" <no****@here.co m> wrote in message
> news:un******** ******@tk2msftn gp13.phx.gbl...
> > trying to display pdf file in browser
> > fails on this line:
> > Response.Conten tType = "applicatio n/pdf"
> >
> > getting an error about no declaration found for "response"
> >
> > what declaration is needed ???
> >
> >
> >
> >
>
>



Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
19024
by: theroo | last post by:
Hi there, I am driving myself crazy over this problem. I have used this very same function in another page without any problems, but now I am experiencing the "Error: Expected ';'" when i try and run it, and it doesn't fire (obviously, because there is an error). The code is:
10
20836
by: Kobu | last post by:
My question is about the use and meaning of the terms "declaration" and "definition" as it pertains to the C language. I've read sources that mix the two up when talking about such things as setting aside storage for an object, defining/declaring a struct, parts of a function, referencing an external variable in another module. ...
8
16293
by: gh0st54 | last post by:
Hi I'm trying to post to Paypal to process payment I try a server.tranfer but I get the error : "System.ArgumentException: Invalid path for child request 'https://www.paypal.com/cgi-bin/webscr'. A virtual path is expected." how can I post to paypal for processing ?
3
2243
by: rdi | last post by:
The import statements weren't copy/pasted, but everything INSIDE the class WAS copy pasted from the help file. Starting with the myMail.From line and going down to the SmtpMail.Send line, EVERY line results in a "Declaration Expected" error. -- RDI (remove the exclamation from the email address) Imports System.Web Imports...
1
6614
by: STAGED | last post by:
The script: proc bugsy { } { global helmet pack forget .widget1 if { $helmet(key1) } { pack .widget2 -anchor nw -side top -expand 0 } else { show_new_widget }
3
5414
by: wwwursa | last post by:
I am trying to use the Right function in a VB6 program. I have used it used many times before in other programs. When I press the enter key after entering the code line, the word "Right" turns into "RIGHT" in all capital letters The line is LongText = RIGHT(LongText, 2) I have used Option Explicit to make sure all variables are...
6
5309
by: Lawrence Spector | last post by:
I ran into a problem using g++. Visual Studio 2005 never complained about this, but with g++ I ran into this error. I can't figure out if I've done something wrong or if this is a compiler bug. Here's a very simple example which should illustrate what I'm doing. #include <iostream> template <class T> class TestBase {
1
9482
by: jmvidalvia | last post by:
Hi! My second post, very similar to the first one. I just mounted a debian server and start to run some few scripts. They "seem" to run, but sometimes (5% of times) I am getting this error message: /home/jmd/sh/muestras.sh: line 2: Note that R0220444 is one of the files in /home/as400/muestras folder. This is /home/jmd/sh/muestras.sh:...
9
11162
by: Rohit | last post by:
I am trying to initialize an array whose initializers depend on value of Enums. I take enum and then decide the initializer value, so that even if enum value changes because of addition to list even then I should be able to get correct value for the array element. I need value and state to be present in a single byte thats why I use macros. ...
0
7410
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7351
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7593
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7350
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7691
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5887
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5276
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4896
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3392
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.