Geeks With Blogs
mikedopp Geekswithblogs (edition)

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);
}
}
Posted on Thursday, November 15, 2007 9:23 AM | Back to top


Comments on this post: Ajaxify your FreeTextBox control

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © mikedopp | Powered by: GeeksWithBlogs.net