本文介绍了ckeditor未在更新面板中正确加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在更新面板中有一个下拉列表和ck-editor
下拉列表中的
OnSelectedIndexChanged事件ck-editor未正确加载
它看起来像一个文本框..
请给出任何解决方案
C#代码是:
I have a dropdown list and ck-editor within update panel
on dropdown OnSelectedIndexChanged event ck-editor is not loading properly
its looking like a textbox..
Please give any solution
C# code is :
protected void ddlSubCategory_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlSubCategory.SelectedIndex != 0)
{
lblNewSubCategory.Visible = false;
txtNewSubCat.Visible = false;
txtNewSubCat.Text = "";
btnNew.Visible = false;
Panel1.Visible = true;
}
else
{
lblNewSubCategory.Visible = false;
txtNewSubCat.Visible = false;
txtNewSubCat.Text = "";
btnNew.Visible = false;
Panel1.Visible = false;
}
}
aspx页面是:
aspx page is :
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table cellpadding="3" cellspacing="3">
<tr>
<td>
Select Category
</td>
<td>
<asp:Label ID="lblSubCategory" runat="server" Text="Select SubCategory" Visible="false"></asp:Label>
</td>
<td>
<asp:Label ID="lblNewCategory" runat="server" Text="Enter New Category" Visible="false"></asp:Label>
</td>
<td>
<asp:Label ID="lblNewSubCategory" runat="server" Text="Enter New SubCategory" Visible="false"></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="ddlCategory" Width="180px" runat="server" AutoPostBack="True"
Height="30px" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged" Style="padding-right: 9px;"
class="searching_p_bg">
</asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="ddlSubCategory" Width="180px" runat="server" Visible="false"
EnableViewState="true" Height="30px" AutoPostBack="True" OnSelectedIndexChanged="ddlSubCategory_SelectedIndexChanged"
Style="padding-right: 9px;" class="searching_p_bg">
</asp:DropDownList>
</td>
<td>
<asp:TextBox ID="txtNewCat" runat="server" Visible="false" Style="width: 192px; height: 18px;"
class="searching_p_bg" />
</td>
<td>
<asp:TextBox ID="txtNewSubCat" runat="server" Visible="false" Style="width: 192px;
height: 18px;" class="searching_p_bg" />
</td>
<td>
<asp:Button ID="btnNew" runat="server" Text="Submit" Visible="false" OnClick="btnNew_Click"
class="c_edit gray_edit" Width="102px" />
</td>
</tr>
</table>
<asp:Panel ID="Panel1" runat="server" Visible="false">
<table cellpadding="3" cellspacing="3" width="90%">
<tr>
<td width="20%">
Create New Product
</td>
<td>
</td>
</tr>
<tr>
<td>
Product Title
</td>
<td>
<asp:TextBox ID="txtTitle" runat="server" Width="759px" CssClass="searching_p_bg"></asp:TextBox>
</td>
</tr>
<tr>
<td valign="top">
Description
</td>
<td>
<CKEditor:CKEditorControl ID="ckDescription" runat="server"></CKEditor:CKEditorControl>
</td>
</tr>
<tr>
<td>
Features
</td>
<td>
<asp:TextBox ID="txtFeatures" runat="server" CssClass="searching_p_bg"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Status
</td>
<td>
<asp:DropDownList ID="ddlStatus" runat="server" Width="150px" Style="padding-right: 9px;"
class="searching_p_bg" Height="30px">
<asp:ListItem>Disable</asp:ListItem>
<asp:ListItem>Enable</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Select Image
</td>
<td>
<asp:FileUpload ID="fluImage" runat="server" />
<asp:FileUpload ID="fluImage2" runat="server" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:FileUpload ID="fluImage3" runat="server" />
<asp:FileUpload ID="fluImage4" runat="server" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Panel ID="Panel2" runat="server" GroupingText="Inventory">
<table cellpadding="3" cellspacing="3" style="margin-top: -12px" width="100%">
<tr>
<td style="width: 171px; padding-left: 10px;">
Pricing
</td>
<td>
Base Price
<asp:TextBox ID="txtBasePrice" runat="server" onkeypress="return AcceptNumericOnly(event, false);"
CssClass="searching_p_bg" Width="180px"></asp:TextBox>
<asp:DropDownList ID="ddlCurrency" runat="server" Style="padding-right: 9px;" class="searching_p_bg"
Height="30px" Width="72px">
<asp:ListItem>INR</asp:ListItem>
</asp:DropDownList>
Sale Price
<asp:TextBox ID="txtDiscount" runat="server" onkeypress="return AcceptNumericOnly(event, false);"
CssClass="searching_p_bg" Width="180px"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 171px; padding-left: 10px;">
Availability
</td>
<td>
<asp:DropDownList ID="ddlAva1" runat="server" Width="192px" AutoPostBack="True" Style="padding-right: 9px;"
class="searching_p_bg" Height="30px" OnSelectedIndexChanged="ddlAva1_SelectedIndexChanged">
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
</asp:DropDownList>
-
<asp:DropDownList ID="ddlAva2" runat="server" Width="192px" Style="padding-right: 9px;"
class="searching_p_bg" Height="30px">
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="ddlAva3" runat="server" Width="192px" Style="padding-right: 9px;"
class="searching_p_bg" Height="30px">
<asp:ListItem>Days</asp:ListItem>
<asp:ListItem>Weeks</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2">
<table cellpadding="3" cellspacing="3" width="100%">
<tr>
<td style="width: 171px;">
Shipping Cost
</td>
<td>
<asp:TextBox ID="txtShipping" runat="server" onkeypress="return AcceptNumericOnly(event, false);"
CssClass="searching_p_bg"></asp:TextBox>
</td>
<td style="width: 159px;">
Warrenty
</td>
<td>
<asp:TextBox ID="txtWarrenty" runat="server" CssClass="searching_p_bg"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Notes
</td>
<td>
<asp:TextBox ID="txtNotes" runat="server" CssClass="searching_p_bg"></asp:TextBox>
</td>
<td>
Quantity
</td>
<td>
<asp:TextBox ID="txtQuantity" runat="server" onkeypress="return AcceptNumericOnly(event, false);"
MaxLength="5" CssClass="searching_p_bg"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Available Sizes
</td>
<td>
<asp:TextBox ID="txtSize" runat="server" onkeypress="return AcceptNumericOnly(event, false);"
CssClass="searching_p_bg"></asp:TextBox>
</td>
<td>
Available Colors
</td>
<td>
<asp:TextBox ID="txtColor" runat="server" CssClass="searching_p_bg" />
</td>
</tr>
<tr>
<td>
Length
</td>
<td>
<asp:TextBox ID="txtLength" runat="server" CssClass="searching_p_bg" />
</td>
<td>
Material
</td>
<td>
<asp:TextBox ID="txtMaterial" runat="server" CssClass="searching_p_bg" />
</td>
</tr>
<tr>
<td>
Body Finish
</td>
<td>
<asp:TextBox ID="txtBodyFinish" runat="server" CssClass="searching_p_bg" />
</td>
<td>
Mattress Size (w*h cm)
</td>
<td>
<asp:TextBox ID="txtMattressSize" runat="server" CssClass="searching_p_bg" />
</td>
</tr>
<tr>
<td>
Floor Clearance Height (cm)
</td>
<td>
<asp:TextBox ID="txtClearanceHeight" runat="server" CssClass="searching_p_bg" />
</td>
<td>
Product Dimensions (w*l*h)
</td>
<td>
<asp:TextBox ID="txtDimensions" runat="server" CssClass="searching_p_bg" />
</td>
</tr>
<tr>
<td>
Product Weight
</td>
<td>
<asp:TextBox ID="txtWeight" runat="server" CssClass="searching_p_bg" />
</td>
<td>
Fabric
</td>
<td>
<asp:TextBox ID="txtFabric" runat="server" CssClass="searching_p_bg" />
</td>
</tr>
<tr>
<td>
Type of Weave
</td>
<td>
<asp:TextBox ID="txtWeave" runat="server" CssClass="searching_p_bg" />
</td>
<td>
Bed Sheet Dimensions (l*b) ( If Any )
</td>
<td>
<asp:TextBox ID="txtBedSheet" runat="server" CssClass="searching_p_bg" />
</td>
</tr>
<tr>
<td>
Pillow Cover Dimensions (l*b) ( If Any )
</td>
<td>
<asp:TextBox ID="txtPillowCover" runat="server" CssClass="searching_p_bg" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnSave" runat="server" class="registration_b blue" Text="Create Product"
OnClick="btnSave_Click" OnClientClick="return validationnew();" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlSubCategory" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
推荐答案
这篇关于ckeditor未在更新面板中正确加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!