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.
Call vbscript after postback
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Mayur GujrathiRank #666 · 3.6K reputationPosted Jul 14, 2011, 10:00 PM EDT
Zoran HorvatRank #792 · 2.9K reputationPosted Jul 15, 2011, 1:57 PM EDT
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