H.Ghassami
H.Ghassami

Reputation: 1022

ASP.NET : my html element repeated after my postback finish

i have an asp web page and my page contains to RadCombobox. for first drop down i set item_requested method (when the user click on it and select the theater name.it has a post back and after post back the second drop down fill with sans numbers ).
my problem is here:
after page post back the second field set duplicate in my page. in these pictures you can see that.
Before post back:
enter image description here

the second image :(After postback the second fielset repeated)
enter image description here

Note:
all of my controls in update panel. after i remove update panel from my page i doesn't happen again.Do you know the reason ? :[

Upvotes: 1

Views: 636

Answers (2)

Andrei
Andrei

Reputation: 44600

You probably have some logic where you are adding this component. Try to check IsPostBack before adding the component to the page. Just like that:

if (!IsPostBack) 
{
    //dynamically add component
}

Upvotes: 1

互联网fans
互联网fans

Reputation: 1

        protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack == false)
        {
            // ASPX C#
        }
    }

ASP ................... IM NOT GOOD AT ASP

Upvotes: 0

Related Questions