activeview_MultiView.SetActiveView(View) 方法 (System.Web.UI.WebControls) | Microsoft Docs

將指定的 View 控制項設為 MultiView 控制項中的現用檢視表。Sets the specified View control to the active view within a MultiView control.

public:

void SetActiveView(System::Web::UI::WebControls::View ^ view);

public void SetActiveView (System.Web.UI.WebControls.View view);

member this.SetActiveView : System.Web.UI.WebControls.View -> unit

Public Sub SetActiveView (view As View)

參數

view

要在 View 控制項中設為現用檢視表的 MultiView 控制項。A View control to set as the active view within a MultiView control.

例外狀況

指定的 view 參數值不包含在 MultiView 控制項中。The specified view parameter value was not contained in the MultiView control.

範例

下列範例示範如何建立 MultiView 包含三個控制項的控制項 View 。The following example demonstrates how to create a MultiView control that contains three View controls. 第一次載入頁面時, DefaultView 會使用方法將設定為現用視圖 SetActiveView 。The first time the page is loaded, the DefaultView is set as the active view using the SetActiveView method. 每個 View 控制項都包含連結按鈕,可讓使用者流覽至不同的視圖。Each View control contains link buttons to allow the user to navigate to different views.

注意

下列程式碼範例會使用單一檔案程式碼模型,如果直接複製到程式碼後端檔案,則可能無法正確運作。The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. 這個程式碼範例必須複製到副檔名為 .aspx 的空文字檔中。This code sample must be copied into an empty text file that has an .aspx extension. 如需 Web Form 程式碼模型的詳細資訊,請參閱 ASP.NET Web Forms 頁面程式碼模型。For more information on the Web Forms code model, see ASP.NET Web Forms Page Code Model.

/p>

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&g

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值