We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

link to specific tab in home page

Thread ID:

Created:

Updated:

Platform:

Replies:

110134 Jul 20,2013 05:11 AM Jul 23,2013 12:03 AM Orubase 3
loading
Tags: Orubase
Yara
Asked On July 20, 2013 05:11 AM

I'm working on asp.net mvc, and using ORUBASE  tools, in the first of all thanks for your help   

I have a question

I used in my home page orubase.tab control , suppose home page  named  "index" , in index page there is  three tabs

Home :that use  LoadAjaxContent(Url.Content(home))

About : that use  LoadAjaxContent(Url.Content(about))

Contacts : that use  LoadAjaxContent(Url.Content(contacts))

And in each page has some links to another pages , in the child pages there is back button that return to specific parent tab

I can write code to return to index page, but I can't return to specific tab in index page

Can you help me please

Thanks and regards

Yara


Thivya [Syncfusion]
Replied On July 22, 2013 03:32 AM

Hi Yara,

Thanks for your interest in Orubase product.

You can make your desired tab to be active by means of “SelectedItemIndex” property. Please follow the below code snippets.

1.Controller – Here we have stored the selected item index value in one session variable and sent to the view page

public ActionResult Index()
{
    ViewData["index"] = Session["selectedindex"] ?? 0;
    return View();
}

2.Index Page – In this the SelectedItemIndex property will set the value got from the controller

@Html.Orubase().Tab("lbCore").SelectedItemIndex((int)ViewData["Index"]).Items(items =>
{
    items.Add().Text("Home").LoadAjaxContent("Home", "Home").ImageUrl("/images/Normal.png").ActiveImageUrl("/images/Active.png");
    items.Add().Text("About").LoadAjaxContent("About", "Home").ImageUrl("/images/Normal.png").ActiveImageUrl("/images/Active.png");
    items.Add().Text("Contacts").LoadAjaxContent("Contacts", "Home").ImageUrl("/images/Normal.png").ActiveImageUrl("/images/Active.png");
})

3.About Page – While clicking list item we have performed reload action. Hence while reloading the page that we have set the Index value as current tab index(value 1) and returned to the view page so that it will make the tab item be active with the returned value

//ViewPage
@{
Html.Orubase().ListBox("list1").OnItemSelect("Select").Items(itemm =>
   
{
        itemm.Add().Text("Item21");
        itemm.Add().Text("Item22");
        itemm.Add().Text("Item23");
        itemm.Add().Text("Item24");
        itemm.Add().Text("Item25");
    }).Render();

}

//Controller
public
ActionResult About()
{
    Session["selectedindex"] = 1;
    return PartialView();
}

//Script section
<
script type="text/javascript">
   
function Select() {
        location.reload();
    }
</
script>

We have also created the sample and attached here.

Please go through the sample and get back to us if it helps out.

Regards,
Thivya.


DemoWeb_30e671db.zip

Yara
Replied On July 22, 2013 07:24 AM

thank you very much for your help

Yara

Thivya [Syncfusion]
Replied On July 23, 2013 12:03 AM

Hi Yara,

We are glad to help you out. Please feel free to get in touch with us if you require any further clarifications.

Regards,
Thivya.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;