控制与标准的HTML [英] Controls versus standard HTML

查看:92
本文介绍了控制与标准的HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进入ASP.NET(C# - 我知道它不会针对此问题的重要,但充分披露和所有),而我爱的 ASP:式的控制节省了我很多繁琐的HTML各具特色的,我经常与某些行为感到沮丧。我遇到的最后一个晚上母版页时:我的< ASP:的BulletedList ID =导航> ,当转换成HTML,成为 < UL ID =ct100_nav方式>

I'm getting into ASP.NET (C# - I know it doesn't matter for this particular question, but full disclosure and all that), and while I love that the asp:-style controls save me a lot of tedious HTML-crafting, I am often frustrated with certain behaviors. I encountered one last night when working with Master Pages: my <asp:BulletedList ID="nav">, when converted into HTML, became <ul id="ct100_nav">.

有其他问题 - 我注意到,当你自动填充DataGrid,它增加了属性生成的表,我并不希望有

There are other issues--I noticed that when you auto-populate a DataGrid, it adds attributes to the resulting table that I don't necessarily want there.

我知道有个约定优于配置,你有,当你依靠一个框架,以接替你的一些单调乏味的义务,接受一定量,但公约在这些情况下都没有这么多任何既定惯例,而是不必要的附加功能。我知道的为什么的标识增加了preFIX,但我应该能够调整,把这样的事情了,尤其是因为,作为一个有点web标准传道的,我不重复HTML的id在单个页面反正。

I know that there is a certain amount of "convention over configuration" that you have to accept when you rely on a framework to take over some of your tedious duties, but the "conventions" in these cases aren't so much any established conventions, but rather unnecessary extras. I know why the ID adds the prefix, but I should be able to tweak and turn things like this off, especially since, as a bit of a web standards evangelist, I don't duplicated HTML id's in a single page anyway.

因此​​,这里的问题是,对于那些开发者ASP.NET比我更有经验:在开发和部署应用程序您的经验,你如何利用这些控件?你是否发现自己诉诸回到硬codeD HTML?你使用的混合?我并不想设计围绕这些控件的特质怪癖我的HTML,但是,如果可能的话,我想可能的情况下利用它们。

So the question here is for those ASP.NET devs more seasoned than I: in your experiences in developing and deploying apps, how do you leverage these controls? Do you find yourself resorting back to hard-coded HTML? Do you use a blend? I don't want to design my HTML around idiosyncratic quirks in these controls, but, if possible, I'd like to leverage them when possible.

什么是男孩呢?

推荐答案

就个人而言,

我认为标准的ASP.NET控件都很好,室内的东西 - 快速和肮脏在这种情况良好。但是,我曾经与一个Web开发谁也是一个设计师的工作,他拒绝使用ASP.NET控件,只有code在HTML并在必要时添加=服务器标签。这更多的是因为他想知道自己的HTML究竟是怎样被渲染,在反正当时,一些ASP.NET控件不会渲染标准的符合性。

I think the standard ASP.NET controls are fine for inhouse stuff - quick and dirty is good in that scenario. But, I once worked with a web developer who was also a designer and he refused to use the ASP.NET controls and only code in HTML and add runat="server" tags when needed. This was more because he wanted to know exactly how his HTML was going to be rendered, and at the time anyway, some of the ASP.NET controls wouldn't render to standards compliance.

我坐在中间的某个位置 - 使用HTML在适当情况下,而不是在没有。你可以排序的最好的 CSS控制适配器两全其美

I sit somewhere in the middle - use HTML where appropriate and not when not. You can sort of best of both worlds with the CSS control Adapters

这篇关于控制与标准的HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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