Jef*_*tin 7 asp.net servercontrols web-controls
我有一个自定义服务器控件,其属性为Title.使用控件时,我想在aspx页面中设置标题的值,如下所示:
<cc1:customControl runat="server" Title='<%= PagePropertyValue%>' >
more content
</cc1:customControl>
Run Code Online (Sandbox Code Playgroud)
但是,当我执行此操作时,我将显示正确的字符串<%= PagePropertyValue%>而不是我希望看到的属性值.
所以在尝试数据绑定表达式后(如下所示).我没有得到看起来很糟糕的字符串文字,但我也没有得到任何其他东西.
<cc1:customControl runat="server" Title='<%# PagePropertyValue%>' >
more content
</cc1:customControl>
Run Code Online (Sandbox Code Playgroud)
我需要对自定义控件做什么才能获得这种价值?或者我需要对页面做些什么.
归档时间: |
|
查看次数: |
3777 次 |
最近记录: |