By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,289 Members | 1,447 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,289 IT Pros & Developers. It's quick & easy.

quote error in response.write

P: n/a
I can't figure this out, why am I getting ")" expected and ";" expected on
this line?

Response.Write("<input type=""hidden"" name=""item_number"" value="".COM,
MLSNumber"">");
- L
Sep 21 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Simply, you're stopping a string with the first doublequote and then
starting it again with the second. Two double-quotes together don't mean
anything. What you need is the escape sequence which, if memory serves me
correctly, is \"

Response.Write("<input type=\"hidden\" name=\"item_number\" value=\".COM,
MLSNumber\">");
--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Luke Davis" <lu**@gorealco.comwrote in message
news:uR******************@TK2MSFTNGP03.phx.gbl...
>I can't figure this out, why am I getting ")" expected and ";" expected on
this line?

Response.Write("<input type=""hidden"" name=""item_number"" value="".COM,
MLSNumber"">");
- L

Sep 21 '07 #2

P: n/a
This is giving me a " Sys.Webforms.PageRequestManagerParserErrorExceptio n:
The message received from the server could not be parsed. Common causes
for this error are when the response is modified by calls to
Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<input type="hidden"'.

This is the script, it's running inside of an update panel , any ideas?

<%

if (TextBox1.Text == "tom")

{

Response.Write("<input type=\"hidden\" name=\"amount\" value=\"19.95\">");

Response.Write("<input type=\"hidden\" name=\"item_number\" value=\".COM,
MLSNumber\">");
}

else

{

Response.Write("<input type=\"hidden\" name=\"amount\" value=\"14.95\">");

Response.Write("<input type=\"hidden\" name=\"item_number\" value=\".INFO,
MLSNumber\">");

}

%>
Sep 21 '07 #3

P: n/a
Luke Davis wrote:
This is giving me a " Sys.Webforms.PageRequestManagerParserErrorExceptio n:
The message received from the server could not be parsed. Common causes
for this error are when the response is modified by calls to
Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<input type="hidden"'.

This is the script, it's running inside of an update panel , any ideas?
8< snip
Response.Write("<input type=\"hidden\" name=\"amount\" value=\"19.95\">");
8< snip

All elements in xhtml has to be terminated. Put a / before the ending >
in the tag.

--
Göran Andersson
_____
http://www.guffa.com
Sep 21 '07 #4

P: n/a
It looks like that didn't work, any other ideas?

"Göran Andersson" <gu***@guffa.comwrote in message
news:e$**************@TK2MSFTNGP03.phx.gbl...
Luke Davis wrote:
>This is giving me a "
Sys.Webforms.PageRequestManagerParserErrorExcepti on: The message received
from the server could not be parsed. Common causes for this error are
when the response is modified by calls to Response.Write(), response
filters, HttpModules, or server trace is enabled. Details: Error parsing
near '<input type="hidden"'.

This is the script, it's running inside of an update panel , any ideas?

8< snip
>Response.Write("<input type=\"hidden\" name=\"amount\"
value=\"19.95\">");

8< snip

All elements in xhtml has to be terminated. Put a / before the ending in
the tag.

--
Göran Andersson
_____
http://www.guffa.com

Sep 21 '07 #5

P: n/a
Luke Davis wrote:
It looks like that didn't work, any other ideas?
Did you do it on all the input tags? What error message do you get now?

--
Göran Andersson
_____
http://www.guffa.com
Sep 21 '07 #6

P: n/a
On Sep 21, 9:42 pm, "Luke Davis" <l...@gorealco.comwrote:
It looks like that didn't work, any other ideas?

"Göran Andersson" <gu...@guffa.comwrote in message

news:e$**************@TK2MSFTNGP03.phx.gbl...
Luke Davis wrote:
This is giving me a "
Sys.Webforms.PageRequestManagerParserErrorExcepti on: The message received
from the server could not be parsed. Common causes for this error are
when the response is modified by calls to Response.Write(), response
filters, HttpModules, or server trace is enabled. Details: Error parsing
near '<input type="hidden"'.
This is the script, it's running inside of an update panel , any ideas?
8< snip
Response.Write("<input type=\"hidden\" name=\"amount\"
value=\"19.95\">");
8< snip
All elements in xhtml has to be terminated. Put a / before the ending >in
the tag.
--
Göran Andersson
_____
http://www.guffa.com- Hide quoted text -

- Show quoted text -
Try to set

<%@ Page enableEventValidation="false" %>

Hope this helps

Oct 10 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.