Dear experts how can i call vbscript or javascript after page postback
I want to export my "div" to excel format on server side button click but my vbscript executes before filling "div". I want to execute it after page postback.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Zoran HorvatPosted Jul 15, 2011, 5:57 PM
In ASP.NET you can use Page.IsPostBack property to test whether the page is called or postback. So it looks like solution to your problem is to generate vbscript/javascript only if IsPostBack is true and otherwise not to generate the script. In that way script will execute only if page is postback and div is consequently populated.
Zoran
Mayur GujrathiPosted Jul 15, 2011, 2:00 AM