简体   繁体   English

Visual Studio 2010设计器未正确显示AJAX选项卡容器

[英]Visual Studio 2010 designer not displaying AJAX tab container correctly

OverView 概观

I'm having problem with Ajax Tab Container ,I have added three tabs in it namely "Add User" , "Delete User" and "Update User". 我遇到了Ajax Tab Container的问题,我在其中添加了三个选项卡,即“添加用户”,“删除用户”和“更新用户”。 I had to add them using "Source View" ,because I was unable to find the smart tag of Ajax Tab Container. 我不得不使用“Source View”添加它们,因为我无法找到Ajax Tab Container的智能标记。

  • I can't modify tabs, 我不能修改标签,
  • Can't add event handlers, 无法添加事件处理程序,

Problem 问题
So the problem is Visual Studio 2010 is not displaying AJAX tab container correctly in the designer and I have to manually modify the control in the "Source View" which is time consuming. 所以问题是Visual Studio 2010没有在设计器中正确显示AJAX选项卡容器,我必须在“源视图”中手动修改控件,这很费时间。

Inside Visual Studio Ajax Tab Rendering 内部Visual Studio Ajax选项卡呈现
内部Visual Studio Ajax选项卡呈现

Although the Tab container is correctly rendered in browser. 虽然Tab容器在浏览器中正确呈现。

Inside FireFox Ajax Tab container Rendering Rendering 内部FireFox Ajax选项卡容器渲染渲染 内部FireFox渲染

How to fix it ? 怎么解决?

Update: found this post related 更新: 发现此帖子相关

I have to manually modify the control in the "Source View" which is a waste of time. 我必须在“源视图”中手动修改控件,这是浪费时间。

This is not a waste of time. 这不是浪费时间。 Personally I don't think Design Mode should be used at all, and that you should familarise yourself with understanding the code so that you can visualise this yourself. 就个人而言,我认为根本不应该使用设计模式,并且您应该熟悉代码,以便您可以自己想象这一点。

If you are interested in becoming a professional web developer, then I would recommend removing Design Mode from Visual Studio (This is possible through the Tools option*). 如果您有兴趣成为一名专业的Web开发人员,那么我建议从Visual Studio中删除设计模式(这可以通过工具选项*)。 This will then resolve your issue. 这将解决您的问题。

*Go to Tools > HTML Designer > Untick Enable HTML Designer *转到Tools > HTML Designer >取消Enable HTML Designer

The VS designer can't render everything that a browser can. VS设计器无法呈现浏览器可以呈现的所有内容。 It's not designed to (sorry, bad pun). 这不是为了(对不起,坏双关语)。 It's meant as a design time reference, but you can't see what will truly be rendered until you run your page in various browsers. 它意味着作为设计时参考,但在各种浏览器中运行页面之前,您无法看到真正呈现的内容。

Most professional web developers don't use the designer anyway since you can produce cleaner code by hand. 大多数专业Web开发人员都不使用设计器,因为您可以手动生成更清晰的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM