2

How to cause a postback using javascript in ASP.NET.

2 Answers 2

4
<script language='Javascript'>
__doPostBack('__Page', 'MyCustomArgument');
</script>

or if you just strictly want a postback you can send a null argument

<script language='Javascript'>
__doPostBack('__Page', '');
</script>
Sign up to request clarification or add additional context in comments.

Comments

0

Jacobnlsn is correct. However, if you want to do custom handling of the postback on the page as well, take a look at the IPostbackEventHandler interface.

http://msdn.microsoft.com/en-us/library/system.web.ui.ipostbackeventhandler.aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.