首页 新闻 会员 周边 捐助

新手:MultiView不执行操作,请大家帮忙看看是怎么回事.

0
悬赏园豆:100 [已解决问题] 解决于 2008-11-13 22:11

这两段代码上面一段是我的,既不执行导航按钮操作跳到另一个界面,也没有任何错误提示,下面一段代码是MSDN上摘的,没有问题,可以通过.我看这两段代码没有什么区别啊,真搞不明白是怎么回事.

<div>
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
<asp:View ID="View1" runat="server">
<asp:Button ID="Button1" runat="server" Text="to view2" CommandArgument="View2" CommandName="SwithViewbyID" />view1</asp:View>
<asp:View ID="View2" runat="server">
<asp:Button ID="Button2" runat="server" Text="to view3" CommandArgument="View3" CommandName="SwithViewbyID" />view2</asp:View>
<asp:View ID="View3" runat="server">
<asp:Button ID="Button3" runat="server" Text="to view1" CommandArgument="View1" CommandName="SwithViewbyID" />view3</asp:View>
</asp:MultiView>

<%--<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
<asp:View ID="View1" runat="server">
View 1<br />
<br />
<asp:Button ID="Button1" runat="server"
CommandArgument="View2"
CommandName="SwitchViewByID"
Text="Go to View2" />
</asp:View>
<asp:View ID="View2" runat="server">
View 2<br />
<br />
<asp:Button ID="Button2" runat="server"
CommandArgument="View3"
CommandName="SwitchViewByID"
Text="Go to View 3" />
</asp:View>
<asp:View ID="View3" runat="server">
View 3<br />
<br />
<asp:Button ID="Button3" runat="server"
CommandArgument="View1"
CommandName="SwitchViewByID"
Text="Go to View 1" />
</asp:View>
</asp:MultiView>--%></div>

海风1998的主页 海风1998 | 初学一级 | 园豆:20
提问于:2008-11-13 10:55
< >
分享
最佳答案
0

这个写错了:CommandName="SwithViewbyID"

后边的单词有问题 你的SwithViewbyID应该写成SwitchViewByID

 我试了下,这个还区分大小写.要注意了

哈哈,分拿来!!!

程序员老李 | 小虾三级 |园豆:790 | 2008-11-13 11:26
其他回答(1)
0

呵呵

Jared.Nie | 园豆:1940 (小虾三级) | 2008-11-13 12:30
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册