Skip navigation

A .Net page can be posted back with JavaScript. We can call __doPostBack() function to generate a manual postback.

The following example shows how to do the postback manually with JavaScript and detect the manual postback from server side. In our example, we will call “PerformTask()” server side method on postback. The __doPostBack() function takes two parameters — eventTarget and eventArgument.


__doPostBack(‘__Page’, ‘performTask’);

Server side:

protected void Page_Load(object sender, System.EventArgs e)




if(Request[“__EVENTARGUMENT”] == “performTask”)






private void PerformTask()


//perform the processing after manual postback



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: