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

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top