Button problem

Discussion in 'ASP.NET / ASP.NET Core' started by brightmosquito, Jan 9, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have a form like this:

    <form runat="server">
    <asp:TextBox ID="tb1" runat="server" /><asp:Button ID="btn1" runat="server" />

    <asp:TextBox ID="tb2" runat="server" /><asp:Button ID="btn2" runat="server" />
    </form>

    If I place cursor into tb2, when I press Enter key, btn1 will be processed. How can I makebtn2 be processed instead of btn1?
     
  2. I think we had some problems like and I dont have access to the code at the moment, but from memory I think we did some javascript manipulation to modify the active button dependant on which control currently has focus, asp.net web controls dont have the default property like old VB or new VB.Net controls have :(


    I believe it was just when control recieves focus, set the appropriate property of html button through javascript... sorry for being so vague, but might point you in the right direction


    Michael
     
  3. Thank you Michael, I'll try it.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page