Click here to Skip to main content
15,912,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I have made simple application using htmlui tab.now I need to add submitting the form without reload or refresh.

I have following Code.Please anyone help to move forward.


<body>
    <form id="form1" runat="server">
        <div id="tabContainer">

    <table style="width: 100%;">
                            <tr>
                                <td>
                                    <asp:Label ID="Label1" runat="server" Text="Name"></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td>                                
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label2" runat="server" Text="Email Id"></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox></td>                                
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label3" runat="server" Text="Subject"></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label4" runat="server" Text="Your Question"></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="TextBox5" runat="server" TextMode="MultiLine"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label5" runat="server" Text=""></asp:Label></td>
                                <td>
                                    <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click1" /></td>
                            </tr>
                        </table>
              </div>
    </form>
  
</body>
Posted

You can do the post back without reloading the page by using update panels or by using ajax method of jquery librery.

using update panel is easy to implement http://ajax.net-tutorials.com/controls/updatepanel-control/[^].

jQuery ajax method will require you to do a bit of extra coding. [][^]
 
Share this answer
 
Try This Link You got Some Ideas about Tabs in jquery..

http://jetlogs.org/jquery/jquery_ajax_tabs.html#[^]
 
Share this answer
 
To submit without reload, you need Ajax(XmlHttp, iframe), you can also directly use jquery's Ajax function like following,
C#
function submitForm(){var frm = $(event.srcElement).closest("form");
                  if (frm.valid()) {
                      var data = frm.serialize();
                      $.post([your action url], data, function (rt) { ...});
                  }}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900