我使用CreateuserWizard时,需要扩展CreateuserWizard控件,在其中添加的控DropDownList,但是在在代码里无法取得它的ID,查了大量的资料后才发现用这样的方法可以得到这个值DropDownList list=(DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer. FindControl("DropDownList1");
其他控件类似,如TextBox:
string tmp = ((TextBoxCreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl ("txtYz")).Text.Trim();
本文介绍如何在ASP.NET中通过CreateUserWizard控件添加自定义控件,并提供了获取这些控件值的具体方法,例如DropDownList和TextBox等。
920

被折叠的 条评论
为什么被折叠?



