This is a migrated thread and some comments may be shown as answers.

How to use routes with TabStrip

1 Answer 60 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martin Nyborg
Top achievements
Rank 2
Martin Nyborg asked on 09 Feb 2010, 12:08 AM
Why is this not working?

 Html.Telerik().TabStrip()
            .Name("SearchTabs")
            .Items(ts =>
                {
                    ts.Add().Text("Search").Route("SearchSimple/Index");
                    ts.Add().Text("Extended");
                    ts.Add().Text("Expert");
                }
        ).SelectedIndex(0)
         .Render();

I am very new to MVC so please be gentle :-)

1 Answer, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 09 Feb 2010, 08:32 AM
Hello Martin Nyborg,

You should use the Action method in your case:

tabs.Add().Text("Index").Action("Index", "Search");

The Route method accepts a name of a route (as defined in global.asax.cs).

All the best,
Atanas Korchev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
TabStrip
Asked by
Martin Nyborg
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Share this question
or