For Example

Why we need to set autopostback=true of controls
Consider a scenario where the web page is used for entering the user information. The page contains two dropdownlist controls ddlcountry and ddlstate. When user selects the country, the appropriate states be filled in the ddlstate which is loaded from the database. For achieving this requirement, we can set the autopostback property of ddlcountry to true. If we do that we can handle the event in the server side and write code to populate the ddlstate with the values from the database.
This is how we use the autopostback property.
By default the button,linkbutton and imagebutton has an autopostback as an event. The code behind that you write is to handle this postback. A button cannot have an explicit button postback but is in-built.
No comments:
Post a Comment