By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,137 Members | 1,563 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,137 IT Pros & Developers. It's quick & easy.

postback on buttonclick

P: 1
Hi, When i click the button control the page is postback into the server, why this is happening, what is the reason for this,it involves any predefined function or property to request a server why it request a server if i want to give the postback for the other controls(textbox, dropdownlist) i need to set the autopostback true. but it is not necessary in button control, what is the extra things reside in the button control except event fire(onclick) for postback into the server than others
Mar 15 '12 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,731
A button Submits the page to the server.

On the server the page's IsPostBack property is set to True because the the page is being requested by an object within it.

Other controls, like the DropDownList, do not automatically post back to the server (they do not automatically submit the page) because, typically, no server-side processing needs to be done when their property changes.

You can configure controls to automatically post back to the server (in order to do some sort of server-side processing) on particular events for the specific control.

So, essentially when you use an ASP.NET button, it assumes that you want to submit the page for server-side processing when the user clicks the button. But other ASP.NET controls assume that there is no need to submit the page to the server so they do not "post back" by default.

You can configure buttons not to post back to the server, just as you can configure other ASP.NET controls to post back.

I can't go into this any further because I'm not sure what you're trying to accomplish.
Mar 15 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.