呵呵,如果用 Viusual Studio 开发的话
直接拖过去不就行了吗

解决方案 »

  1.   

    <%@ Register TagPrefix="popc" TagName="PopUpCalendar" src="PopUpCalendar.ascx"%>
    <%@ Page language="c#" Codebehind="CaseCircs.aspx.cs" AutoEventWireup="false" Inherits="znfx.CaseCircs" %><body>
    <popc:popupcalendar id="PopUpCalendar_Date" runat="server"></popc:popupcalendar>
    </body>.cs中
    protected PopUpCalendar PopUpCalendar_Date;
      

  2.   

    如要加入label和引用这个label控件如下:public class mycontrol:Webcontrol,inamingcontainer
    protect label label1=new label();
    public Labe Label1
    {
    get {
    return label1;
    }
    }
      

  3.   

    foreach(Control co in this.Controls)
    {
    mytext=co.GetType().ToString();
    if(mytext=="System.Web.UI.WebControls.TextBox")
    ((TextBox)co).Text="xxxxxx";    
    }
    上面这个是引用 TextBox 的