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

[Solved] Tab Strip & Razor

3 Answers 195 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.
Michael
Top achievements
Rank 1
Michael asked on 02 Mar 2011, 08:32 PM
Im finding razor a little confusing:

Can anyone enlighten me why this works
@{ Html.Telerik().TabStrip()
        .Name("TabStrip")
        .Effects(fx => fx.Expand()
                         .Opacity()
                         .OpenDuration(200)
                         .CloseDuration(300))
        .Items(tabstrip =>
        {
            tabstrip.Add()
                .Text("Upcoming Races")
                .ImageUrl("~/Content/Images/grn_runner_sml.png")
                .Content(@<text>
    <ul>
        @foreach (var raceVM in Model.Races)
        {      
            <li><a @Html.ActionLink(raceVM.FullRaceDescription, "Index", new { id = raceVM.Race.RACEID })
 
            </li>
        }
    </ul>
 
    
    </text>);


but this doesnt


@{ Html.Telerik().TabStrip()
        .Name("TabStrip")
        .Effects(fx => fx.Expand()
                         .Opacity()
                         .OpenDuration(200)
                         .CloseDuration(300))
        .Items(tabstrip =>
        {
            tabstrip.Add()
                .Text("Upcoming Races")
                .ImageUrl("~/Content/Images/grn_runner_sml.png")
                .Content(@<text>
 
       <div id="twocols">
            <div id="maincol">  
 
 <ul>
        @foreach (var raceVM in Model.Races)
        {      
            <li><a @Html.ActionLink(raceVM.FullRaceDescription, "Index", new { id = raceVM.Race.RACEID })
 
            </li>
        }
    </ul>
</div>
            <div id="rightcol">
 
    
        @Html.Partial("_RaceDetailView", Model.SelectedRace)
 
            </div>
 
        </div>
    
    </text>);

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 03 Mar 2011, 09:16 AM
Hello Michael,

 
I was not able to reproduce the aforementioned problem. Could you please send us a small working project which replicates this issue? Thus we can observe it locally and advice you further.

Best wishes,
Georgi Krustev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Carlo
Top achievements
Rank 1
answered on 04 May 2011, 11:28 AM
I ran into  the same problem where I was unable to set a <div> in the Content() property of a tabstrip. After disabling my routedebugger things worked fine again.

Cheers,
Carlo
0
Libert
Top achievements
Rank 2
answered on 19 Apr 2012, 09:05 PM
Hey Carlo i am running in the same issue right know where do i disable this , i am new to MVC

Thanks
Tags
TabStrip
Asked by
Michael
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Carlo
Top achievements
Rank 1
Libert
Top achievements
Rank 2
Share this question
or