First off... I'm a noob to both ASP.net and C#. I'm updating a page that already exists to add a button..
My code..
<div style="padding: 10px;float: left;"><table><tr><td><asp:Button id="DoSomething" Text="Build Patch" runat="server" OnClick="DoSomething_click" /><br /></td></tr></table></div>
This lives in my ascx control... the code behind is...
protected void DoSomething_click(object sender, System.EventArgs e)
{
Response.Write("<script> alert('Hi');</script>");
}
It gets wired up on the default.aspx page in
<%@ Register Src="~/ui/MyView.ascx" TagName="MyView" TagPrefix="UC" %>
and is used in a asp:repeater...
<UC:MyView PB=<%# Container.DataItem %> runat="server"></UC:MyView>
The repeater creates the buttons inside a <td>
I supose my question is how do I wire up the onclick for these buttons? I debug and my DoSomething_click method never hits.