的ContentPlaceHolder替换属性? [英] Contentplaceholder for replacing attributes?

查看:192
本文介绍了的ContentPlaceHolder替换属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在code以下的工作,但混淆的Visual Studio。是否有替代/更好的方式来做到这一点?

 <身体LT; ASP:的ContentPlaceHolder ID =BodyAttribute=服务器/>>


解决方案

您总是可以做

 <身体ID =body1=服务器>

此页面显示了一个例子 - 的http:// MSDN .microsoft.com / EN-US /库/ zzk7dby1(vs.71)的.aspx

的例子是基于.NET关1.1,但我已经用了.NET 2.0类似的东西。

The code below works but confuses Visual Studio. Are there alternative/better ways to accomplish this?

<body <asp:contentplaceholder id="BodyAttribute" runat="server"/>>

解决方案

You could always do

<body id="body1" runat="server">

this page shows an example - http://msdn.microsoft.com/en-us/library/zzk7dby1(vs.71).aspx

the example is based off .net 1.1 but i've used something similar for .net 2.0

这篇关于的ContentPlaceHolder替换属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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