Hi Gilbert,
Try this code, it works fine for me.
- <%@ Page Language="vb" AutoEventWireup="false" %>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
- <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
-
- <script type="text/VB" runat="server">
-
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Page.SetFocus(txtMain)
- End Sub
-
- Private Sub btnShow_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnShow.Click
- modalExtender.Show()
- End Sub
- </script>
-
- <style type="text/css">
- /*Modal Popup*/.modalBackground
- {
- background-color: Gray;
- filter: alpha(opacity=70);
- opacity: 0.7;
- }
- .modalBox
- {
- width: 700px;
- text-align: center;
- background-color: #ffffff;
- padding: 1px 0px;
- }
- </style>
- <title></title>
- </head>
- <body>
- <form id="form1" runat="server">
- <asp:ScriptManager ID="scriptMgr" runat="server">
- </asp:ScriptManager>
- <asp:UpdatePanel ID="updMain" runat="server" UpdateMode="Conditional">
- <ContentTemplate>
- <div>
- <asp:TextBox ID="txtMain" runat="server"></asp:TextBox>
- <asp:Button ID="btnShow" runat="server" Text="Show popup" OnClientClick="test()" />
- </div>
- <asp:Panel ID="pnlPopup" runat="server" Style="display: none;" meta:resourcekey="pnlPopupResource1"
- CssClass="modalBox">
- <table style="width: 80%;">
- <tr>
- <td>
- <input type="button" value="click" onclick="test()" />
- <asp:Label ID="lblName" runat="server" AssociatedControlID="txtName" Text="Name:"
- meta:resourcekey="lblNameResource" />
- </td>
- <td>
- <asp:TextBox ID="txtName" runat="server" MaxLength="100" Style="width: 450px;" />
- </td>
- </tr>
- <tr>
- <td>
- <asp:Label ID="lblInquiry" runat="server" Text="Message:" meta:resourcekey="lblInquiryResource" />
- </td>
- <td>
- <CE:Editor Width="455" Height="250" ID="ceInquiry" EditorOnPaste="PasteWord" AutoConfigure="Simple"
- runat="server" ShowBottomBar="true" MaxHTMLLength="4000" ShowWordCount="true"
- ShowHtmlMode="true" ShowPreviewMode="false" ShowTagSelector="false">
- </CE:Editor>
- </td>
- </tr>
- <tr>
- <td style="text-align: right;" colspan="2">
- <asp:Button ID="btnCancel" runat="server" CausesValidation="False" Style="width: auto;"
- Text="Cancel" />
- </td>
- </tr>
- </table>
- </asp:Panel>
- <asp:Button ID="btnDummy" runat="server" Style="display: none;" meta:resourcekey="btnDummyResource1" />
- <cc1:ModalPopupExtender ID="modalExtender" runat="server" TargetControlID="btnDummy"
- PopupControlID="pnlPopup" BackgroundCssClass="modalBackground" DynamicServicePath=""
- Enabled="True" />
- </ContentTemplate>
- </asp:UpdatePanel>
- </form>
- </body>
- </html>
-
- <script type="text/javascript">
- function CuteEditor_OnInitialized(editor)
- {
- var txt=document.getElementById(
- txt.focus();
- }
- </script>
Regards,
Ken