maqskywalker
asked on
C# server side click event for html button
On my page Default.aspx
I have a asp button like this:
<asp:Button ID="Button2" runat="server" Text="Button" />
On this page Default.aspx.cs
The server side click event for the button is this:
protected void Button2_Click(object sender, EventArgs e)
{
}
If I have a html button like this on this page Default.aspx
<input id="Button1" type="button" value="button" />
How do I call the Server-Side click event for it?
I have a asp button like this:
<asp:Button ID="Button2" runat="server" Text="Button" />
On this page Default.aspx.cs
The server side click event for the button is this:
protected void Button2_Click(object sender, EventArgs e)
{
}
If I have a html button like this on this page Default.aspx
<input id="Button1" type="button" value="button" />
How do I call the Server-Side click event for it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
THis is the second time today I provided solution to someone but they accept a different solution.
That solution you accepted as right solution has invalid asp.net tags but good luck as I intend to avoid you next time.
That solution you accepted as right solution has invalid asp.net tags but good luck as I intend to avoid you next time.
Open in new window
You were just mixing things up and that would not have done anything.
By the way, you may want to add some code to your button2_click() event to see what it returns when you click the button.