How to use __doPostBack

Client

<script type=“text/javascript”>
function SaveWithParameter(parameter){
   __doPostBack(‘btnSave’, parameter)
}
</script>

Server

public void Page_Load(object sender, EventArgs e)
{
string sender = Request[“__EVENTTARGET”]; // btnSave
string eventarg = Request[“__EVENTARGUMENT”]; //parameter
}

Advertisements

%d bloggers like this: