Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i m using VS 2008 .

In My webform i have a problem i want To Raise Postback Event manually
without button click or you can say i want that when button clicks it takes two
Postback ...

Please help me in this regard.

Thanks in advance...
Posted
Updated 14-May-11 0:04am
v2

Sorry, but that makes very little sense. Postbacks are not initiated on the server side. The controls contain some Java Script which is executed on the client side. When, for example, a button is clicked, a new request with all kinds of parameters is sent to the server.

Between postbacks no instance of your page exists on the server. At each request (including postbacks) a new instance of the page is instantiated, runs through its life cycle and is destroyed once the response to the request has been sent back.

That's why raising postbacks from the server side makes no sense. At the moment this code is executed you are already in the middle of servicing a request. Even worse, even if you could just start another postback, it would surely hit the same code again, resulting in an endless sequence of postbacks.

I have an idea what you are trying to accomplish with this, but it does not work that way. If I'm right, you have some problem with the page life cycle (everybody does at first) and you had this postback idea to update the page whenever that happens, right?
 
Share this answer
 
Hope this[^] might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900