H
hal
Is it possible when an asp:button is clicked I can have the button use
javascript client side code and fire the click event for the button
for server side code? Code below is an example of what i'm trying to
do:
<script type="text/javascript">
function SetImage()
{
alert("Testing");
}
</script>
<asp:ImageButton ID="btnSubmit" runat="server" ImageUrl="~/Images/
signin_btn.gif" Width="103" Height="33" OnClick="btnSubmit_Click" />
protected void btnSubmit_Click(object sender,
ImageClickEventArgs e)
{
//Doing Stuff
}
I've tried playing around with this code in Page_Load and can't get it
to work:
btnSubmit.Attributes.Add("onclick", "SubmitLoginForm()");
Is this possible to do, and if so what am i missing?
Thanks
javascript client side code and fire the click event for the button
for server side code? Code below is an example of what i'm trying to
do:
<script type="text/javascript">
function SetImage()
{
alert("Testing");
}
</script>
<asp:ImageButton ID="btnSubmit" runat="server" ImageUrl="~/Images/
signin_btn.gif" Width="103" Height="33" OnClick="btnSubmit_Click" />
protected void btnSubmit_Click(object sender,
ImageClickEventArgs e)
{
//Doing Stuff
}
I've tried playing around with this code in Page_Load and can't get it
to work:
btnSubmit.Attributes.Add("onclick", "SubmitLoginForm()");
Is this possible to do, and if so what am i missing?
Thanks