Question

i am using jquery tabs. know i want to jump to the next tab onclick of button. here is my code

 <div id="tabs">
             <ul>
                 <li><a href="#tabs-1">Basic Information</a></li>
                 <li><a href="#tabs-2">Authors</a></li>
             </ul>
        <div id="tabs-1">
     <asp:Button ID="btnSaveAuthors" runat="server" Text="Save" CssClass="button medium green" />
        </div>
        <div id="tabs-2">
        </div>
 </div>

but when i use this javascript function.

  <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=btnSaveAuthors.ClientId%>").click(function (event) 
            {
                $('#tabs').tabs('select', 1);
                return false;
            });
        });
    </script>

it gives me following error

Error   5   'System.Web.UI.WebControls.Button' does not contain a definition for 'ClientId' and no extension method 'ClientId' accepting a first argument of type 'System.Web.UI.WebControls.Button' could be found (are you missing a using directive or an assembly reference?)   

plesase help me to solve this problem. Thanks in advance :)

Was it helpful?

Solution

The "d" in "ClientId" should be capital: "ClientID"

OTHER TIPS

I bet you are using C# which is case sensitive, and the correct name should be 'ClientID': Control.ClientID Property

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top