Experiment for yourself.
Javascript
<script type="text/javascript">
function myfunction(param)
{
__doPostBack("<%= myControl.ClientID %>", "myargs");
}
</script>
And in your in your page code...
protected override void RaisePostBackEvent ( IPostBackEventHandler source, string eventArgument )
{
base.RaisePostBackEvent ( source, eventArgument );
if ( source == this.myControl && eventArgument.IndexOf ( "myargs" ) != -1 )
{
// Do whatever here
}
}
No comments:
Post a Comment