Reputation: 47995
Code:
form1.AcceptButton = accessButton;
and I put:
using System.Windows.Forms;
but it doesnt find it. It says System.Web.UI.HtmlControl.HtmlForm
doesnt have this definition. Uhm?
Upvotes: 0
Views: 108
Reputation: 5433
Put the controls in a panel and set the DefaultButton
:
<asp:Panel DefaultButton="accessButton" runat="server">
<asp:TextBox id="myname" runat="server" />
<asp:Button id="accessButton" Text="Submit" runat="server" />
</asp:Panel>
Upvotes: 1