I'm working on an asp.net 2 app.
I had a page with an input button on it as shown here:
<input id="btnPost" type="button" value="Post" style="width: 66px" />
I need that button to run some code behind code that will update some data
in the associated sql 2005 dababase. I know how to write the codebehind
procedure That's not a problem. The problem is getting the javascript in the
input button to run the code behind procedure.
When I double clicked the input button (in the VWD designer) it of course
changed the definition of the button as follows:
<input id="btnPost" type="button" value="Post" style="width: 66px"
language="javascript" onclick="return btnPost_onclick()" />
and added the following to the page:
<script language="javascript" type="text/javascript">
<!--
function btnPost_onclick() {
// Not sure what to put here to call PostMissingClassmateData shown
below
}
// -->
</script>
I have this in the code behind file:
Partial Class Admin_MissingClasssmateSubmissions
Inherits System.Web.UI.Page
Protected Sub PostMissingClassmateData()
'This code will run a stored procedure in the backend
End Sub
End Class
Thanks,
Keith