开发者

send value using __doPostBack

开发者 https://www.devze.com 2023-02-08 18:51 出处:网络
I\'m sending a value (id) from javascript like this: __doPostBack(\'\',id) and at the server side I get it like this:

I'm sending a value (id) from javascript like this:

__doPostBack('',id)

and at the server side I get it like this:

var id = Request["__EVENTARGUMENT"];

the problem is that sometimes other controls also do stuff and the var id also get's value but not with the value I sent, but some control did.

how do I send this value separately so that in var id only the value that I sent usi开发者_StackOverflowng js can be.


One way to hack this I guess is to concat some token prefix like myId_ with id instead of just id as parameter, and parse id back in ASP.NET

0

精彩评论

暂无评论...
验证码 换一张
取 消