<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function ajaxRequest(operation)
{
var ajaxManager = <%= RadAjaxManager1.ClientID %>;
ajaxManager.ajaxRequest(operation);
}
</script>
</telerik:RadScriptBlock>
In my code behind file, I have a temp variable:
string temp;
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
if (e.Argument != "Save")
{
return;
}
//Saving content
string content = RadEditor1.Content;
}
protected void Page_Load(object sender, EventArgs e)
{
temp = "123";
}
The problem I'm having is that whenever user hits the save button, the global variable (temp) is wiped out. This is very frustrating...! Could someone help me please? I don't know what to do... Thanks!
| <table cellspacing="0" cellpadding="0" border="0" align="center" width="639"> |
| <tbody> |
| <tr> |
| <td width="15"> </td> |
| <td width="256"><a target="_blank" href="http://www.webook.com"><img height="87" border="0" width="256" alt="WEbook" src="http://www.bsf01.com/creatives/webook/090107/builds/images/webookLogo.gif" /></a></td> |
| <td width="79"><img height="87" width="101" alt="Wow" src="http://www.bsf01.com/creatives/webook/090107/builds/images/wow.gif" /></td> |
| <td width="289" style="font-family: arial,helvetica,sans-serif; font-size: 16px; color: rgb(255, 102, 0);"> </td> |
| </tr> |
| <tr> |
| <td><img height="110" width="15" src="http://www.bsf01.com/creatives/webook/090107/builds/images/r2green.gif" /></td> |
| <td bgcolor="#669900" style="font-family: arial,helvetica,sans-serif; font-size: 11px; line-height: 16px; color: rgb(226, 239, 201);"> |
| <span style="font-size: 16px; color: rgb(255, 255, 255);"><strong>You make it work.</strong></span> |
| Help us create the dynamic, irreverent, and open place for writers and people who like reading to meet, write, react, and think together.</td> |
| <td><img height="110" width="101" src="http://www.bsf01.com/creatives/webook/090107/builds/images/r2green2.gif" /></td> |
| <td><a href="https://www.webook.com/login.aspx"><img height="110" border="0" width="267" alt="Login to WEbook" src="http://www.bsf01.com/creatives/webook/090107/builds/images/loginWeBook.gif" /></a></td> |
| </tr> |
| </tbody> |
| </table> |
| <table cellspacing="0" cellpadding="0" border="0" align="center" width="639"> |
| <tbody> |
| <tr> |
| <td width="15"> </td> |
| <td width="256"></td> |
| <td width="79"><img height="87" width="101" alt="Wow" src="http://www.bsf01.com/creatives/webook/090107/builds/images/wow.gif" /></td> |
| <td width="289" style="font-family: arial,helvetica,sans-serif; font-size: 16px; color: rgb(255, 102, 0);"> </td> |
| <a target="_blank" href="http://www.bsf.com"><img height="87" border="0" width="256" alt="WEbook" src="http://www.bsf01.com/creatives/webook/090107/builds/images/webookLogo.gif" /></a> |
| </tr> |
| <tr> |
| <td><img height="110" width="15" src="http://www.bsf01.com/creatives/webook/090107/builds/images/r2green.gif" /></td> |
| <td bgcolor="#669900" style="font-family: arial,helvetica,sans-serif; font-size: 11px; line-height: 16px; color: rgb(226, 239, 201);"> |
| <span style="font-size: 16px; color: rgb(255, 255, 255);"><strong>You make it work.</strong></span> |
| Help us create the dynamic, irreverent, and open place for writers and people who like reading to meet, write, react, and think together.</td> |
| <td><img height="110" width="101" src="http://www.bsf01.com/creatives/webook/090107/builds/images/r2green2.gif" /></td> |
| <td><a href="https://www.webook.com/login.aspx"><img height="110" border="0" width="267" alt="Login to WEbook" src="http://www.bsf01.com/creatives/webook/090107/builds/images/loginWeBook.gif" /></a></td> |
| </tr> |
| </tbody> |
| </table> |

| <telerik:GridHyperLinkColumn DataTextField="EstimateID" UniqueName="EstimateID" HeaderText="Quote #" AllowFiltering="false" |
| DataNavigateUrlFormatString="~/QuoteDetail.aspx?EstimateID={0}" DataNavigateUrlFields="EstimateID" SortExpression="EstimateID" |
| SortAscImageUrl="~/Images/SortAsc.gif" SortDescImageUrl="~/Images/SortDesc.gif" ItemStyle-Font-Underline="true"> |
| <ItemStyle HorizontalAlign="Center" Font-Size="12px" /> |
| </telerik:GridHyperLinkColumn> |
| <td> Some text</td> |
| shows as: |
| Â Some text |
| string contentData = Server.HtmlEncode(this._RadEditor.Content); |
| contentDatacontentData = contentData.Replace(" ", "&nbsp;"); |
| contentData = Server.HtmlDecode(contentData); |