locked
how can I use Editor and Calender extender in same page in asp.net RRS feed

  • Question

  • User910710390 posted

    When I use Editor and calendar extender in same page html in asp.net

    the calendar is not working but, Editor is working  ,how can I work  calendar extender with editor in same page html 

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="gridspec.aspx.vb" Inherits="CATS.SpecRules.gridspec" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
        TagPrefix="cc1" %> -->editor
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" >
    <head runat="server">
        <title></title>
        <link rel="Stylesheet" type="text/css" href ="css/cseditor.css" /> 
            <link rel="Stylesheet" type="text/css" href ="css/neutral.css" /> 
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            </asp:ToolkitScriptManager>  -->scriptmanager
        </div>
        <table class="tab">
        <tr>
        <td>
            <asp:Panel ID="Panel1" CssClass="pan" runat="server">
           
        <table class="tab">
        <tr>
       <td>
       <table class="tab">
       <tr>
       <td align ="right" class="tdd">
        <asp:Label ID="lbldate" runat="server" cssclass="VIEWBOXCAPTION"   Text="التاريخ"></asp:Label> </td>
      <td>
        <asp:TextBox ID="txtdate" CssClass="EDIT" runat="server" Width="150px"></asp:TextBox>
      
         
    <asp:CalendarExtender Id="caldate" TargetControlID="txtdate" Format="dd-MMM-yyyy"   runat="server"></asp:CalendarExtender> -->CalenderExtender
     <asp:RequiredFieldValidator  ID="rqvaldate" ControlToValidate="txtdate"  ErrorMessage="الرجاء إدخال التاريخ"  runat ="server"   >
          </asp:RequiredFieldValidator>
       
        </td>
        <td class="tdg" align="left"  >
            <asp:Label ID="lblmsg" runat="server" Text=""></asp:Label>
        </td>
    
       </tr>
       </table>
       </td>
        </tr> 
        
        <tr>
        <td>
        <table class="tab">
        <tr>
        <td align="center" ><asp:Label ID="lbldet" runat="server" cssclass="VIEWBOXCAPTION"  Text="تفاصيل محضر الإجتماع"></asp:Label></td>
        </tr>
        <tr>
         <td >
    <cc1:Editor ID="edspec" runat="server"></asp:Editor> -->Editor
    
        </td>
        </tr>
        <tr>
        <td align="center"  >
            <asp:ImageButton ID="Imgadd"  ImageUrl="~/imgs/addwithbutt.png"  runat="server" />
        </td>
        </tr>
        </table>
         </td>
       </tr>
        
        </table>
         </asp:Panel>
        </td>
        </tr>
        <tr>
      <td>
      <table>
      <tr>
      <td class ="tdg">
      
      </td>
        <td>
              <asp:GridView ID="gvspec" runat="server" Width="581px" AutoGenerateColumns="False" 
                CellPadding="4" ForeColor="#333333"  GridLines="None">
                <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:TemplateField HeaderText="ID" Visible="False">
                        <ItemTemplate>
                          <asp:Label ID="lblid" CssClass="EDIT" runat="server" Text='<%# bind("COMS_COMMISSIONORID") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="التاريخ">
                        <ItemTemplate>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                            <asp:LinkButton ID="lkdate" CssClass="EDIT"  runat="server" CommandName="Cancel"  
                                Text='<%# bind("coms_date") %>'  ></asp:LinkButton>
                       
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="تفاصيل محضر إجتماع  المفوضين">
                        <ItemTemplate>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="lkdet"     
                                  runat="server"  CssClass="EDIT"
                                Text='<%# bind("COMS_DETAILS") %>'  CommandName="Cancel" 
                                 ></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="إظهار على الشهادة">
                        <ItemTemplate>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:CheckBox ID="chf"  runat="server"   />
                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:ImageButton ID="imguf" runat="server" CommandName="update" Height="26px" 
                                ImageUrl="~/imgs/save.jpg" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#2461BF" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
        
        </td>
      </tr>
      </table>
      </td>
      
        </tr>
        </table>
      
        </form>
    </body>
    </html>
    

    when click on textbox date the calendar does not show but, when I delete the editor the calendar shows and works in page

    how can I do ,please help me 

    Tuesday, May 12, 2015 3:58 AM

Answers

  • User61956409 posted

    Hi Mohammed,

    Thanks for your post.

    According to your description, I create the following sample to reproduce your problem, the code works fine on my side. You could test it by yourself.

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    
    <!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>
                <table>
                    <tr>
                        <td>
                            <asp:TextBox ID="txtdate" runat="server"></asp:TextBox>
                            <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtdate" Format="dd-MMM-yyyy"></asp:CalendarExtender>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <cc1:Editor ID="Editor1" runat="server" />
                        </td>
                    </tr>
                </table>
            </div>
        </form>
    </body>
    </html> 
    

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 12, 2015 9:54 PM