user3925057
user3925057

Reputation: 11

How do I avoid repopulating my dropdownlist on postback?

In asp.net I enable the autopostback property in a dropdown list . whenever i select a list item of dropdown menu same list items added in to dropdown list this probles how can i solved?

Upvotes: 0

Views: 35

Answers (1)

Black Frog
Black Frog

Reputation: 11703

Check for the Page.IsPostBack Property.

private void Page_Load()
{
    if (!IsPostBack)
    {
        // load combo box
        ...
    }
}

Upvotes: 1

Related Questions