User800549252 posted
Hi all. I have a simple webform with an Ajax Editor inside an UpdatePanel control.
It still does a postback of the whole page.
Googled about 200 entries and couldn't find a solution.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="bbb.aspx.cs" Inherits="myAJAX.bbb" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <title></title> </head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<cc1:Editor ID="Editor1" runat="server" Height="250px" Width="400px" />
<br /> <b>Enter your Content</b>
<br /> <asp:Button ID="btnSubmit" runat="server" Text="submit" OnClick="btnSubmit_Click" />
<br /> <asp:Label ID="lblResult" runat="server" Text="__________"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
Code behind :
protected void btnSubmit_Click(object sender, EventArgs e)
{ lblResult.Text = Editor1.Content.Trim();
Editor1.Content = string.Empty; }
How can I avoid the full postback so the screen would not annoyingly flicker.
Please help. Thanks.
Gadi