下面是我的代码,它提供两个函数1来触发控制器中的动作,它执行操作,而2则激活选项卡面板,而不是。我做错了什么。
<Grid>
<ItemsControl ItemsSource="{Binding AllMachines}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas Name="canvasDrawnMachines" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Rectangle Name="rectangleDrawnMachine"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
这是我的旧代码与我的ajax调用:
<l1 class="active">
<a href="#tab1" onclick="location.href='@Url.Action("communitiesLanding","home", new {id = 0})'" data-toggle="tab">Registered</a></li>
<l1><a href="#tab2" onclick="location.href='@Url.Action("communitiesLanding","home", new {id = 1})'" data-toggle="tab">Certified</a></li>
的javascript:
<li class="active"><a href="#tab1" onclick="setCert(0);" data-toggle="tab">Registered</a></li>
<li><a href="#tab2" onclick="setCert(1);" data-toggle="tab">Certified</a></li>