摘要:
我们使用以下的方法来做:首先先定义自定义控件 *.ascxpublic class yourcontrol : System.Web.UI.UserControl{ pravite string _Mytext public string Mytext { get{ ... } set{ ... } }}在调用它的 .aspx文件中:首先要注册自定义控件,注册的语句要写到页面的上方(属于页面指令的位置。 )<%@ Register TagPrefix="uc1" TagName="yourcontrol" Src="yourcontrol 阅读全文