i have a web custom control
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs"
Inherits="WebApplication5.WebUserControl1" %>
<asp:DropDownList ID="ddlnew" AutoPostBack="true" runat="server"
onselectedindexchanged="ddlnew_SelectedIndexChanged">
<asp:ListItem Text="text1" />
<asp:ListItem Text="text1" />
<asp:ListItem Text="text2" />
<asp:ListItem Text="text1" />
<asp:ListItem Text="text2" />
<asp:ListItem Text="text2" />
</asp:DropDownList>
and on the Default.aspx page
<asp:Button Text="PostBack" ID="btnPost" runat="server"
onclick="btnPost_Click" />
and on the Default.aspx.cs
protected void btnPost_Click(object sender, EventArgs e)
{
WebUserControl1 uc = (WebUserControl1)Page.LoadControl("~/WebUserControl1.ascx");
PlaceHolder.Controls.Add(uc);
}
and when we select any item from dropdown it postback and the control hide from the page
so please help how it can be prevented from hide
thanks