新的ASP" showat"在VS2010属性要求不一致。为什么? [英] New asp "showat" attribute required inconsistently in VS2010. Why?

查看:215
本文介绍了新的ASP" showat"在VS2010属性要求不一致。为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我生成c。使用T4模板在Visual Studio 2010中$ C $,我得到当我尝试下面的错误,我的每个控制的asp编译:

When I generate code using T4 templates in Visual Studio 2010, I get the following error for each of my asp controls when I try to compile:

控制ddState缺少必需的属性showat。

Control "ddState" is missing required attribute "showat".

我从来没有得到在.NET中的previous版本这个错误。此外,我不要得到这个错误,当我手动构建我的网页通过拖动/下探,我也不把它当我输入了文本控制自己。当我产生code,我必须手动添加 showat =客户端来我的标签编译器是快乐的。这是我的理解是,我从来没有明确指定此标记。以下内容:

I have never gotten this error in previous versions of .NET. Further, I don't get this error when I manually construct my pages either by dragging/dropping, nor do I get it when I type out the control text myself. When I generate code, I have to manually add showat="client" to my tag for the compiler to be happy. It was my understanding that I never had to explicitly specify this tag. The following:

<asp:dropdownlist id="ddState" runat="server" showat="client" />

解决了这个问题。为什么我把它添加到生成的code,但没有其他时间?

solves the problem. Why do I have to add this to generated code but not other times?

(这是一个VS-2010的WebForms项目,采用VB,如果有差别。)

(It's a VS-2010 webforms project, using VB, in case that makes a difference.)

推荐答案

请检查是否VB做任何事情在Web窗体设计网页,当你使用IDE添加控件。我不知道VB如何插入隐含的标签。但是,这会是对T4模板会想念,只是一个想法......

Check to see if VB does anything in the web form designer page when you use the IDE to add the control. I'm not sure how VB inserts the implicit tag. But that would be something the T4 template would miss, just a thought...

这篇关于新的ASP&QUOT; showat&QUOT;在VS2010属性要求不一致。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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