views:

26

answers:

1

Hi,

I have an ASP.NET MVC view on which I've placed jQuery tabs. I'm loading the tabs using:

function getContentTab(index) {  
    var url='<% = Url.Content("~/Books/GetBookTab") %>/' + index; 
    ...
}

I have stored the user's default tab selection in the model associated with this view.

My question is this, how can I set the tab number (index) with the number in my model data?

Thanks,

Arnold

A: 

Maybe I'm misunderstanding your question, but is this what you're looking for?

$(document).ready(function() { 
      $("#tabs").tabs(); 
      getContentTab(<%=this.Model.DefaultTabID %>); 
});
Luke
Hi Luke,Sorry for the delay in getting back to this. This answer works for me!Thanks
Arnold