javascript - Possible way of doPostBack via Link? -


i have following code want try , find way use link e.g roblox.com/dopostback... don't have click on it. mean make dopostback via link instead of button.

is there anyway can implement this?

code:

<div id="ctl00_cphroblox_joingroup" class="btn-neutral btn-large" onclick="__dopostback('joingroupdiv', 'click');" style="margin-top: 10px;"> join group 

you can put in anchor link follows:

<a id="ctl00_cphroblox_joingroup" class="btn-neutral btn-large" href="javascript:__dopostback('joingroupdiv','')" style="margin-top: 10px;">my link</a> 

however, think may asking if create url sole purpose trigger postback.

i express concern on reasoning wanting this; can done via setting query string parameter client id trigger (rewriting can make url pretty). take query string, , write out javascript on page in question fire postback:

<script> (function() {    // call postback here based on querystring    var idfromquerystring = '<%= request.querystring["controlid"] %>';    __dopostback(idfromquerystring,'') })(); </script> 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -