mikedopp.net

doppNet
posts - 56, comments - 8, trackbacks - 1

Ajaxify your FreeTextBox control

Thanks to: senyl @ Freetextbox

This code will allow you to ajaxify your FreeTextBox control(wysiwyg)

public class ContentManagementBasePage : System.Web.UI.Page
{
 
protected void Page_Load(object sender, EventArgs e)
{
 
if (!Page.IsPostBack)
{
Page.ClientScript.RegisterClientScriptInclude("FTB-FreeTextBox", VirtualPathUtility.MakeRelative(Request.Path, "~/scripts/FTB-FreeTextBox.js"));
Page.ClientScript.RegisterClientScriptInclude("FTB-Utility", VirtualPathUtility.MakeRelative(Request.Path, "~/scripts/FTB-Utility.js"));
Page.ClientScript.RegisterClientScriptInclude("FTB-Toolbars", VirtualPathUtility.MakeRelative(Request.Path, "~/scripts/FTB-ToolbarItems.js"));
Page.ClientScript.RegisterClientScriptInclude("FTB-ImageGallery", VirtualPathUtility.MakeRelative(Request.Path, "~/scripts/FTB-ImageGallery.js"));
Page.ClientScript.RegisterClientScriptInclude("FTB-Pro", VirtualPathUtility.MakeRelative(Request.Path, "~/scripts/FTB-Pro.js"));
}
}
 
public new void RegisterOnSubmitStatement(string key, string script)
{
ScriptManager.RegisterOnSubmitStatement(this, typeof(Page), key, script);
}
 
[Obsolete]
public override void RegisterStartupScript(string key, string script)
{
string newScript = script.Replace("FTB_AddEvent(window,'load',function () {", "").Replace("});", "");
ScriptManager.RegisterStartupScript(this, typeof(Page), key, newScript, false);
}
}

Print | posted on Thursday, November 15, 2007 9:23 AM |

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 4 and 8 and type the answer here:

Powered by: