cause postback from javascript

M

mr. dropdown

Is it possible that a javascript code will raise postback? I mean, without
any control related to the postback, just submit the webform with all the
data, into some server method?

Thanks
 
K

Karl Seguin

The trick is to get the javascript __dopostback code out on the page. The
simplest way I know of is to call GetPostBackEventReference(Me) from the
page

you can then simply do:
<a href="javascript:__doPostBack('','');">Test</a>

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top