Omu
Omu

Reputation: 71198

send value using __doPostBack

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 using js can be.

Upvotes: 0

Views: 519

Answers (1)

Arsen Mkrtchyan
Arsen Mkrtchyan

Reputation: 50712

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

Upvotes: 1

Related Questions