How to check if javascript has run in codebehind ( c# )?
codeInfront:
Code:
<input type="button" onclick="JavaScript:clearSelections();" name="clear" value="Delete"/>
codeBehind:
Code:
public void Page_Init( object sende, System.EventArgs e )
{
if( ?input button has been klicked? )
{
.....
}
}
In my code behind I want to reset an object when the button has been klicked. But how can I see if that has happened?
Re: How to check if javascript has run in codebehind ( c# )?
Remember that code behind is on the server-side. You will have to submit the page in order for information to go back to the server.
Are you attempting to reset HTML objects on the client-side, or server-side? If client-side, I would suggest using JavaScript instead.