发布于 2016-05-27 01:04:07 | 106 次阅读 | 评论: 0 | 来源: 网友投递
ASP.NET
ASP.NET 是.NET FrameWork的一部分,是一项微软公司的技术,是一种使嵌入网页中的脚本可由因特网服务器执行的服务器端脚本技术,它可以在通过HTTP请求文档时再在Web服务器上动态创建它们。 指 Active Server Pages(动态服务器页面) ,运行于 IIS(Internet Information Server 服务,是Windows开发的Web服务器)之中的程序 。
<%@ 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" %>