Announcement

Collapse
No announcement yet.

How to Make Default Button?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Make Default Button?

    hellow friends, can enybody know how to make a default button so that when user enter some text in textbox and then pess Enter then button_click event should fires. If any body have idea then pls help me.
    My website: thiet ke web, thiet ke web cong ty - My facebook: @alinasunder9x

    #2
    $(document).ready(function()
    { $('#TextBoxId').keypress(function(e)
    { i
    f(e.keyCode==13) // 13 is enter key code
    $('#linkadd').click();
    });
    });

    Comment


      #3
      Hello, webcenter

      Based on your query, to make default button using asp.net that shown in below code :

      <form id="form1" runat="server" defaultbutton="Button1">
      <asp:Button ID="Button1" runat="server" Text="Button"
      OnClick = "Button1_Click" />
      <asp:Button ID="Button2" runat="server" Text="Button"
      OnClick = "Button2_Click" />
      <asp:Button ID="Button3" runat="server" Text="Button"
      OnClick = "Button3_Click" />
      <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
      </form>

      I hope above information will be useful for you.

      Thank you.
      Custom Software Development
      http://www.ifourtechnolab.com/custom...re-development

      Comment

      Working...
      X