the page post back to the inital state when data loads from the drop down list
i have a page named loginsecurity_test.aspx.there are 3 radio buttons on it when user selects one button only one login form displays.for example when i select individual user button a form is displayed.i have to select a customer number from a drop down list.when i select a customer number from it the page post back and instead of taking to the form again it go back to the inital stage where only three radio buttons are being displayed.the language is vb.net for the radio but开发者_运维技巧ton functionality i am using javascript
At a guess, you need to check Page.IsPostback in your page load event so that you can track the state of the page.
You need to DataBind the DropDownList in the PageLoad event like this
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//DataBind the DropDownList
}
}
精彩评论