>>>通过判断,然后调用对应的用户控件
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
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
解决方案 »
- 关于asp.net中的DropDownList控件的用法
- Server is so Busy
- 请教一个关于SQLSERVER2000的初级连接问题
- Datagrid绑定数据问题?.............Datagrid绑定数据问题?.............谢谢大家
- 有人知道在哪可以下载到.net xml 视频吗?如果知道告诉我一下好吗?谢谢啦
- 每点一次按钮,页面就加载一次,怎样防止?
- 请教Coalesys的PanelBar中中文显示问题
- 简单却不简单
- 请问怎样设计显示一般论坛的首页?谢谢...急用!
- 各位高手!在Web窗体页中数据更新,使用数据集和使用执行sql语句直接访问数据库,哪个更好?
- 我想在网页上进行FTP操作,该如何做
- WebApplication中取数据的问题
mycntl1.Title="aaaa";pl1.Controls.Add(mycntl1); //此处假设 pl1 是一个 PlaceHolder 控件。//这种方法可以将control添加到页面中指定的位置。
举一个例子,我有一个页面 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;
}大概这个意思
if (strABC == "1")
{
c = LoadControl("_1.ascx");
}
else if (strABC == "2")
{
c = LoadControl("_2.ascx");
}
...
else
{
c = LoadControl("default.ascx");
}FormID.Controls.Add(c);