you have to know about how to create user defined control.
来源:互联网 发布:单片机培训 编辑:程序博客网 时间:2024/06/05 15:25
You want to create dynamic user control in you C# code. One thing you must know is, you must register your control in your aspx file. you must add a sentence like this,
<%@ Register TagPrefix="Acme" TagName="Message" Src="~/ascx/FileDisplayFolder.ascx" %>
or else, you can't use the code to covert the control type. You can get only a usercontrol type. You can't use properties you created in your user control. that is awlful, you can't pass values to it.
if you registered your user control, you can create the control like this,
ascx_FileDisplayFolder Ctr = (ascx_FileDisplayFolder)Page.LoadControl("../ascx/FileDisplayFolder.ascx"); //加载控件
Ctr.FolderName = folderName;
contentMainBody.Controls.Add(Ctr);
That's it!!!!!
- you have to know about how to create user defined control.
- How to create user defined properties in Maven
- Things You Need To Know about Nolock
- How to resolve: You do not have a license to use this ActiveX control
- All you ever wanted to know about Workflow and how it relates to Java, Transactions and Concurrency
- How to create .lib file when you have .dll and .h files onle
- How to create .lib file when you only have .dll and .h files
- HTML5: What You Have To Know For Interview
- Something you have to know in Cocos2d-x 3.x
- How to create a read-only user in TFS source control
- Ajax: IE and Mozilla Errors you need to know about
- 100 Things You Need to Know about Microsoft Windows Vista
- What do you need to know about localization?
- FW: Everything you need to know about pointers in C
- Ajax: IE and Mozilla Errors you need to know about
- What you may need to know about DBTransaction::postChanges()
- What you need to know about BVT (Build Verification Testing)
- Ten Things You Need to Know About Indoor Positioning
- 开店需要注意的七大细节
- 创业路上需要注意的六大风险
- 群雄逐鹿,看BI市场的三国时代
- 加快从大容量的数据库中提取数据(查询)
- ORACLE的基本语法集锦
- you have to know about how to create user defined control.
- 加载spring配置文件的工具类
- 开开开
- SQL Server应用程序中的高级SQL注入
- Visual Studio .Net 2008下载!!!!!!.........................................置顶推荐
- 朋友无意间讲的一笑话
- treeview属性和方法介绍
- 浅出Java Socket编程
- 解析XML文件