P
phil
Hi,
I defined a Html button but added the option 'runat="server" ' like this:
<form id="form1" runat="server">
<input id="Button1" type="button" value="button" runat="server"
onclick="hfd()" />
</form>
<script language="javascript" type="text/javascript">
function hfd()
{alert("ok")}
</script>
This works.
But if i add the function 'button1_click' in the code-behind like this:
Protected Sub Button1_ServerClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.ServerClick
Response.Write("ok from server")
End Sub
I expect first the Alert and then the response.write message, but I get the
javascript error: expected: ';' and nothing is shown.
Is it not possible to do a client-event and a server-event together?
Thanks for help
Phil
I defined a Html button but added the option 'runat="server" ' like this:
<form id="form1" runat="server">
<input id="Button1" type="button" value="button" runat="server"
onclick="hfd()" />
</form>
<script language="javascript" type="text/javascript">
function hfd()
{alert("ok")}
</script>
This works.
But if i add the function 'button1_click' in the code-behind like this:
Protected Sub Button1_ServerClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.ServerClick
Response.Write("ok from server")
End Sub
I expect first the Alert and then the response.write message, but I get the
javascript error: expected: ';' and nothing is shown.
Is it not possible to do a client-event and a server-event together?
Thanks for help
Phil