Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using jquery tab in asp.net application, I am displaying some asp.net controls in it. The problem arising is that after I click submit button,the tab control stops working and displays the tabs as hyperlink.
This is how I am making tabs

JavaScript
$(function () {
    $("#myTabs").tabs();
});

This is my HTML

HTML
    <div id="myTabs">
        <ul>
            <li><a href="#info">My Info</a></li>
            <li><a href="#account">My Account</a></li>
        </ul>
        <div id="info" >
</div>
<div id="account">
</div>
<div>


This is my submit button
ASP.NET
<asp:Button runat="server" ID="btnsave" OnClick="btnsave_Click" Text="Save" />



When I submit the form, These two anchors display as normal anchors and there is no error in developer's tool.

What I have tried:

I have checked the source of page by clicking View source, Jquery, jquery ui and its css reference is there even after post back.
Posted
Comments
Karthik_Mahalingam 27-Apr-16 0:56am    
are you using update panel?
aarif moh shaikh 27-Apr-16 1:18am    
Check 'myTabs' actual id with the help of View Source
Syed Salman Raza Zaidi 27-Apr-16 2:06am    
No I am not using update panel
Syed Salman Raza Zaidi 27-Apr-16 2:06am    
ID is correct, it is working fine till I submit the form
Sinisa Hajnal 27-Apr-16 3:31am    
MY guess it that you have something (probably CSS) not loading after postback. Check for any errors in javascript, move CSS files to be first loaded (move them up). Move your javascript down to just before closing body tag.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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