i added ascx control in tab control with C# codes. if you click any tabs. ASCX control load. tab control in update pane. Alos ASCX control includes button if you click button you can add some value to database but ASCX disappear. i think that it is reloaded. How can i solve it? i loaded ascx control if i click tab control. i have a button on ASCX. i clicked button ASCX disapper..
protected void ASPxPageControl1_ActiveTabChanged(object source,
DevExpress.Web.ASPxTabControl.TabControlEventArgs e)
{
if (ASPxPageControl1.ActiveTabPage.Name == "Ali Sp. Reqs")
PhAliSpReqs.Controls.Add(UserControlHelper.LoadControl(this.Page, "~/EngWebUserControl/AliSpReqs.ascx"));
else if (ASPxPageControl1.ActiveTabPage.Name == "Test")
PhTest.Controls.Add(UserControlHelper.LoadControl(this.Page, "~/EngWebUserControl/Test.ascx"));
ASCX:
public partial class Test : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void Button1_Click(object sender, EventArgs e)
{
if (txtTest.Text != String.Empty)
{
Label1.Text = "Hello!";
}
else
Label1.Text = "Error";
}
}
if i clicked tab EVERY THING IS GOOD. But click button on ascx. ASCx control disappear. How can i solve it!!!