Hello All,
Would someone please help explain If not IsPostBack to me and give me some examples as to when to use it and where in the code I have to use it?
When do I need to set AutoPostBack to True?
Any info on this is greatly appreciated!
Thanks much in Advanced!

Recommended Answers

All 3 Replies

Thank you very much for the links! I can access IsPostBack Link, but can't access the AutoPostBack. Would you please give me some advice on AutoPostBack?
Thanks much!

The AutoPostBack property is used to set whether or not an automatic post back will happen when you interact with the control. For example, take the drop down example. You may want a post back to occir when you select an item in the drop down because you may perform some logic server side. Or, you may not want to post back, but simply allow the user to make a selection from the drop down and then perform a post back when the user clicks on the submit button.

For example...

<asp:DropDownList ID="dropDown1" runat="server" AutoPostBack="True" CssClass="dropDown">

You can use IsPostBack in your code behind to determine if a post back occurred.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.