T
Tim Mackey
hi,
asp.net 2. can anyone explain why this code does not work in firefox
(2.0.0.1), but does work in IE 7.
if you hit enter after typing something into the textbox, it should fire the
Submit button click handler, instead it fires the event for the bogus button
above it. btw it doesn't matter if i set it to ClientID, UniqueID or
"btnSubmit" hard-coded, they all fail.
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Bogus" />
<aspanel ID="pnlSelect" runat="server">
<asp:TextBox ID="txtID" runat="server"
Columns="4"></asp:TextBox>
<asp:Button ID="btnSelect" runat="server"
OnClick="btnSelect_Click" Text="Submit" />
</aspanel>
</form>
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
Page.Form.DefaultFocus = this.txtID.ClientID;
Page.Form.DefaultButton = this.btnSelect.UniqueID;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("BOGUS BUTTON");
}
protected void btnSelect_Click(object sender, EventArgs e)
{
Response.Write("SUBMIT BUTTON");
}
}
thanks
tim
asp.net 2. can anyone explain why this code does not work in firefox
(2.0.0.1), but does work in IE 7.
if you hit enter after typing something into the textbox, it should fire the
Submit button click handler, instead it fires the event for the bogus button
above it. btw it doesn't matter if i set it to ClientID, UniqueID or
"btnSubmit" hard-coded, they all fail.
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Bogus" />
<aspanel ID="pnlSelect" runat="server">
<asp:TextBox ID="txtID" runat="server"
Columns="4"></asp:TextBox>
<asp:Button ID="btnSelect" runat="server"
OnClick="btnSelect_Click" Text="Submit" />
</aspanel>
</form>
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
Page.Form.DefaultFocus = this.txtID.ClientID;
Page.Form.DefaultButton = this.btnSelect.UniqueID;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("BOGUS BUTTON");
}
protected void btnSelect_Click(object sender, EventArgs e)
{
Response.Write("SUBMIT BUTTON");
}
}
thanks
tim