65.9K
CodeProject is changing. Read more.
Home

Creating a Delayed Postback

starIconstarIconstarIconemptyStarIconemptyStarIcon

3.00/5 (2 votes)

May 24, 2011

CPOL
viewsIcon

12050

Especially as the use of JQuery grows, there may be time when you'll want a postback to occur but not right away, especially if you want to animate something on the browser first.

Server Code: (VB, roll your own semicolons)
Protected PostBackStr As String
PostBackStr = Page.ClientScript.GetPostBackEventReference(Me, "MyCustomArgument")
Client Code:
setTimeout("<%= PostBackStr %>", 1000);