>>>通过判断,然后调用对应的用户控件
your question is too vague, what kind of 判断?to load the ascx control into the page, use Page.LoadControl methodsee
Web 窗体用户控件
http://chs.gotdotnet.com/quickstart/aspplus/doc/webpagelets.aspx

解决方案 »

  1.   

    myUserControl mycntl1 = new myUserControl();
    mycntl1.Title="aaaa";pl1.Controls.Add(mycntl1);  //此处假设 pl1 是一个 PlaceHolder 控件。//这种方法可以将control添加到页面中指定的位置。
      

  2.   

    先谢谢两位,是这样的:
    举一个例子,我有一个页面 index.aspx(index.aspx.cs)
    和一些用户控件
    _1.ascx
    _2.ascx
    _3.ascx
    _4.ascx我希望通过strABC=Request.QueryString["xxx"]
    if (strABC == "1")
    {
        使用_1.ascx;
    }
    else if (strABC == "2")
    {
        使用_2.ascx;
    }
    ...
    else
    {
        使用 default.ascx;
    }大概这个意思
      

  3.   

    Control c=null;
    if (strABC == "1")
    {
        c = LoadControl("_1.ascx");
    }
    else if (strABC == "2")
    {
        c = LoadControl("_2.ascx");
    }
    ...
    else
    {
       c = LoadControl("default.ascx");
    }FormID.Controls.Add(c);