用户控件问题,急

.aspx文件
<%@ Register TagPrefix="xxxx" TagName="xxxx" Src="xxxx.ascx"%>
......

<xxxx:xxxx id="xxxx_1" runat="server"></xxxx:xxxx >

这个用户控件有1个传入参数abc如果就在aspx文件里写的话就可以写为

<xxxx:xxxx id="xxxx_1" abc="1" runat="server"></xxxx:xxxx >

但我现在需在aspx.cs文件里给这个用户控件指定参数。。。。
请问怎么做啊!
[357 byte] By [cqnetboy-NetBoy] at [2008-2-13]
# 1
http://chs.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx#properties
net_lover-孟子E章 at 2007-11-1 > top of Msdn China Tech,.NET技术,ASP.NET...
# 2
http://chs.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx

http://chs.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/ctrlauth/simple/SimpleProperty.src&file=CS\SimpleProperty.cs&font=3
net_lover-孟子E章 at 2007-11-1 > top of Msdn China Tech,.NET技术,ASP.NET...
# 3
在aspx.cs中加入这一句成员定义

proteced yourNamespace.yourUserControlClass xxxx_1;

无需实例,就可在aspx.cs文件中以this.xxxx_1来调用
kevin2y at 2007-11-1 > top of Msdn China Tech,.NET技术,ASP.NET...
# 4
public string Officename
{
get
{
return office;
}
set
{
office=value;
}
}

protected override void Render(System.Web.UI.HtmlTextWriter writer)
{

if(this.Officename!=String.Empty)
{
if(this.office=="秘尿系结石诊疗中心")
{
str1="0";
this.IMG1.Visible=false;
str1a="";
str1b="0";
}
if(this.office=="肝胆结石诊疗中心")
{
str2="0";
this.IMG2.Visible=false;
str2a="";
str2b="0";
}

}

base.Render(writer);
}
zyq1215-小芸 at 2007-11-1 > top of Msdn China Tech,.NET技术,ASP.NET...
# 5
ok
谢谢两位
cqnetboy-NetBoy at 2007-11-1 > top of Msdn China Tech,.NET技术,ASP.NET...