復制代碼 代碼如下:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewComment.ascx.cs" Inherits="Control_ViewComment"%>
復制代碼 代碼如下:
<%@ Reference Control="MyList.Ascx" %>
<%@ Page Language="C#" CodeFile="GetAscx.aspx.cs" Inherits="AdEntity_GetAscx" %>
引用,這時候在代碼頁GetAscx.aspx.cs可以動態加載ASCX控件了:
Control_ViewComment ctrl = (Control_ViewComment)Page.LoadControl("~/Control/ViewComment.ascx");
ctrl.ID = Request["AdentityId"];
base.Controls.Add(ctrl);
復制代碼 代碼如下:
<%@ Register Assembly="Business" Namespace="Business" TagPrefix="My" %>
新聞熱點
疑難解答
圖片精選