My RadEditor has an Ajax call to save file on webserver as following. The codes are recommended from the documentation:
<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!