传递内容ASP.NET用户控件 [英] Passing in content to ASP.NET user control

查看:134
本文介绍了传递内容ASP.NET用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户控件命名的面包屑。我想在信息传递到像这样该用户控件(类似DROPDOWNLIST项目):

I have a UserControl named BreadCrumb. I would like to pass in information to this user control like so (Similar to DropDownList items):

<uc:BreadCrumb runat="server" id="HeaderBreadCrumb">
    <AddLevel Name="Home" Url="~/Default.aspx" />
    <AddLevel Name="About Us" Url="~/AboutUs.aspx" />
</uc:BreadCrumb>

感谢您的帮助!

推荐答案

请看看这里的如何:创建ASP.NET用户控件这里<一个href=\"http://developers.de/blogs/damir%5Fdobric/archive/2007/03/30/Implementing-Custom-UserControl-with-ListItem-collection.aspx\"相对=nofollow>实现自定义用户控件与ListItem集合。这些方法不使用模板。

Please take a look here How to: Create an ASP.NET User Control and here Implementing Custom UserControl with ListItem collection. These approaches doesn't uses templates.

这篇关于传递内容ASP.NET用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆