I think it is a very simple question, but I'm just stuck on it.
I'm developing custom page for my SharePoint 2010 portal, and I need to add a button (or other elements) to my .aspx page:
<input type="button" id="btnID" onclick="window.location.href='/CustomPage.aspx'" value="GO!" />
I've tried to do it from codebehind:
System.Web.UI.WebControls.Button button = new System.Web.UI.WebControls.Button();
button.OnClientClick = "window.location.href='/CustomPage.aspx'";
button.ID = "btnID";
button.Text = "GO!";
IVersionedContent9.Controls.Add(button);
However, I get this on the page:
<input type="submit" name="ctl00$PlaceHolderMain$UIVersionedContent9$btnID" value="GO!" onclick="window.location.href='/CustomPage.aspx';WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$PlaceHolderMain$UIVersionedContent9$btnID", "", true, "", "", false, false))" id="ctl00_PlaceHolderMain_UIVersionedContent9_btnID" />
I'm not sure with the class, but maybe something else is wrong...
How can I add simple HTML (not ASP.NET) button to the page, without any additional values?
Thanks in advance!