J
Jim in Arizona
I'm brand new at ajax. In fact, about 20 minutes ago was the first time I
got it to work. The problem I'm having on another page did not work,
however.
I'm running into the following error:
Sys.WebForms.PageRequestManagerParserErrorException: 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 'greengreengreengreen'.
This is my code. The strBorder variables is filled with an RGB color string
from the code behind page, ie, the color Green (as noted in the error
message I guess). I'm basically changing the color of a text box border
based on what is being returned from the database. Its a system status
message so if things are going wrong, a little red stop light is loaded next
to the message and the border around the message changes to red.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="15000"
Enabled="true" OnTick="Timer1_Tick" />
<aspataList ID="dlSystemStatus" runat="server" RepeatColumns="1"
Width="100%">
<ItemTemplate>
<div style="border-bottom: 4px;
border-left: 4px;
border-right: 4px;
border-top: 4x;
border-bottom-style: double;
border-left-style: double;
border-right-style: double;
border-top-style: double;
border-bottom-color: <%Response.Write(strBorder) %>;
border-left-color: <%Response.Write(strBorder) %>;
border-right-color: <%Response.Write(strBorder) %>;
border-top-color: <%Response.Write(strBorder) %>;
background-color: White;
margin-right: 5%;
padding:5px;
font-family:Tahoma;font-size:10pt;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="width:40px;"><img
src="<%Response.Write(strLight)%>" align="absmiddle" /></td>
<td valign="top">
<i>Posted By <%# Eval("originator") %>, <%#Eval("jobdesc")%> on <%#
Eval("date") %> at <%#Eval("time")%></i>
<hr size="2" color="black"/>
<b>Customer Message</b>
<br />
<%# Eval("message") %>
<hr />
<b>Technical Details</b>
<br />
<%#Eval("technical")%>
</td>
</tr>
</table>
</div>
</ItemTemplate>
</aspataList>
</ContentTemplate>
</asp:UpdatePanel>
If AJAX can't handel the Response.Write within the update panel, is there
another way to go about this?
TIA,
Jim
got it to work. The problem I'm having on another page did not work,
however.
I'm running into the following error:
Sys.WebForms.PageRequestManagerParserErrorException: 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 'greengreengreengreen'.
This is my code. The strBorder variables is filled with an RGB color string
from the code behind page, ie, the color Green (as noted in the error
message I guess). I'm basically changing the color of a text box border
based on what is being returned from the database. Its a system status
message so if things are going wrong, a little red stop light is loaded next
to the message and the border around the message changes to red.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="15000"
Enabled="true" OnTick="Timer1_Tick" />
<aspataList ID="dlSystemStatus" runat="server" RepeatColumns="1"
Width="100%">
<ItemTemplate>
<div style="border-bottom: 4px;
border-left: 4px;
border-right: 4px;
border-top: 4x;
border-bottom-style: double;
border-left-style: double;
border-right-style: double;
border-top-style: double;
border-bottom-color: <%Response.Write(strBorder) %>;
border-left-color: <%Response.Write(strBorder) %>;
border-right-color: <%Response.Write(strBorder) %>;
border-top-color: <%Response.Write(strBorder) %>;
background-color: White;
margin-right: 5%;
padding:5px;
font-family:Tahoma;font-size:10pt;">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="width:40px;"><img
src="<%Response.Write(strLight)%>" align="absmiddle" /></td>
<td valign="top">
<i>Posted By <%# Eval("originator") %>, <%#Eval("jobdesc")%> on <%#
Eval("date") %> at <%#Eval("time")%></i>
<hr size="2" color="black"/>
<b>Customer Message</b>
<br />
<%# Eval("message") %>
<hr />
<b>Technical Details</b>
<br />
<%#Eval("technical")%>
</td>
</tr>
</table>
</div>
</ItemTemplate>
</aspataList>
</ContentTemplate>
</asp:UpdatePanel>
If AJAX can't handel the Response.Write within the update panel, is there
another way to go about this?
TIA,
Jim