In a user control, simply use the standard HTML button, for example:
<input type="button" id="myButton" onclick="clickTheButton();" value="Click Me"/>
this will call the javascript method "clickTheButton", which may look like this:
<script type="text/javascript"> function clickTheButton() { var Sender = window.event.srcElement; </script>
So now you are going to call the postback from Javascript, identifying the Sender Control arguments and commands. These values ββare sent with a message back as __EventTarget and __EventArgument and are available from httpRequest when the page loads, for example:
protected void Page_Load(object sender, EventArgs e) { string controlName = Request.Params.Get("__EVENTTARGET"); string[] commandArguments = Request.Params.Get("__EVENTARGUMENT").split('|') }
Once you load pages with any values ββthat you have accumulated in commandArguments, you should be able to call any additional methods that you want.
This should make you point in the right direction.
Greetings
CEC
Cos callis
source share