I am using Jquery tabcontrol i.e using tabs() plugin. I have created 5 asp.net pages & assigned each page to each tab.
Everything is working fine but when I try to find a control using $find("cntName") it always returns null. When I run the same page directly i.w without using tab control. It finds the control. when I click on viewsource it shows only `
<div id="tabs">
<ul>
<li><a href="Tab1General.aspx" id="tab1">General</a></li>
<li><a href="Tab2DetailLines.aspx">Detail Lines</a></li>
<li><a href="Tab3InqQuotes.aspx" id="tab3">Inq/Quotes</a></li>
<li><a href="Tab4GrnDetails.aspx">Grn Details</a></li>
<li><a href="Tab5InvoiceDetails.aspx">Invoice Details</a></li>
</ul>
</div>
with jquery javascript & html tags. How do I find control on jquery tab control?
I think this is due to one of two things.
Either the name you are expecting has been changed by asp.net to be something like
pagename@ctrlnameor some such convention.Or the page has not been loaded by the tab until you tab to it and it is active.
One thing you could try is giving (one) of the controls a class name such as
cssClass="TEMPCTRL"and then using the jQuery selector$(".TEMPCTRL")and seeing if an object is returned.If not then it’s possible the page is not loaded yet. If you do then the Id’s have been changed by
asp.netand you should use the class name selector instead of the controls id.