Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1018857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:55:16+00:00 2026-05-16T10:55:16+00:00

i added ascx control in tab control with C# codes. if you click any

  • 0

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!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:55:17+00:00Added an answer on May 16, 2026 at 10:55 am

    If you add controls programmatically in code, every post-back operation needs to re-create the same controls (e.g. during Page_Load) to process the post-back event (in your case, the Save button)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control ( gallery.ascx ) and I want to use the
I added HyperLink control in my page. When I enter http://www.google.com , It is
Added: Working with SQL Server 2000 and 2005, so has to work on both.
Added : I am conducting a study for a new system we're going to
ADDED: This question is now, I believe, subsumed by this one: Using GNU Screen
I added a custom install action to my installer to add one of my
I added some custom fields (public booleans) to the global class in global.asax.cs which
I added some simple WatiN tests to our app today to check that a
I added a text file to a testapp's solution and I want to read
I added the columns in the select list to the order by list, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.