SharePoint Designer即时重新格式化HTML,可以禁用吗? [英] SharePoint Designer Reformatting HTML on the fly, able to disable?

查看:83
本文介绍了SharePoint Designer即时重新格式化HTML,可以禁用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我清除掉剩余的内容之前,我一直在尝试修改SharePoint Designer中的某些母版页,并且每当我进行HTML标记更改时,它都会根据需要重新格式化它们.例如,我试图使代码可读,因此我将项目移动到其自己的行等.保存后,一切立即移回单行代码.

Before I tear what is left of my hair out I have been trying to modify some master pages in SharePoint Designer and whenever I make HTML markup changes it reformats them as it see's fit. For example, I am trying to make the code readable so I am moving items to their own lines and such. As soon as I save it moves everything back to a single line of code.

这是我在VS2003&中遇到的一个问题. VS2005,直到VS2005 SP1.不幸的是,这使得阅读或破译HTML标记是非常麻烦的.有谁知道如何在SharePoint Designer中禁用HTML的这种自动重新格式化?

This was a problem that I had with VS2003 & VS2005, until VS2005 SP1. Unfortunately this makes it very cumbersome to ever read or decipher what the HTML markup is. Does anyone know how to disable this automatic reformatting of HTML in SharePoint Designer?

我的替代方法是使用VS2008,但是在尝试加载SharePoint网站时,我收到一个错误,即Visual Web Developer无法打开SharePoint网站.因此,显然这是不可行的.除了SharePoint Designer之外,还有其他选择吗?还是让它闲暇地修改标记?

My alternative would be to use VS2008 but when attempting to load the SharePoint web site I recieve an error that Visual Web Developer cannot open SharePoint sites. So apparently that is a no go. Is there any alternative to SharePoint Designer or are you stuck with that and having it reform your markup at its leisure?

谢谢您的时间.

推荐答案

仅当我想立即查看更改(例如更改为母版页)的效果时,才使用SharePoint Designer,而不必仅撤消/部署解决方案这样做.

I only use SharePoint Designer when I want to see the effect of a change (e.g. to a master page) immediately, without having to retract/deploy a solution just to do so.

虽然花费的时间更长,但是我在Visual Studio中编写了所有HTML,并在需要时粘贴到SharePoint Designer中.我从不从SharePoint Designer粘贴回Visual Studio,因为该工具往往会保留HTML并添加到HTML中,以便它可以打开它.

While it takes longer, I author all my HTML in Visual Studio, and paste into SharePoint Designer if I need to. I NEVER paste from SharePoint Designer back into Visual Studio, since the tool tends to butcher the HTML and add to it just so it can open it.

话虽如此,重要的是要了解何时(以及何时不使用)SharePoint Designer.您应该为所有资产创建SharePoint解决方案,例如母版页和CSS文件.

Having said that, it's important to understand when (and when not) to use SharePoint Designer. You should be creating SharePoint Solutions for all your assets, e.g. master pages and CSS files.

如果您在SharePoint Designer中打开并编辑其中之一,请记住您正在取消托管/自定义它们.这意味着文件现在位于内容数据库中,而不是磁盘中.这可能会影响您网站的性能.

If you open and edit one of these in SharePoint Designer, remember that you are unghosting/customizing them. This means that the file now lives in the content database instead of on disk. This might affect the performance of your website.

还要记住,SharePoint Designer不理解服务器端代码.因此,如果您的页面布局后面有代码,则在SharePoint Designer中对其进行编辑会破坏它.

Also remember that SharePoint Designer doesn't understand server side code. So if you have a Page Layout that has a code behind, editing it in SharePoint Designer will break it.

这篇关于SharePoint Designer即时重新格式化HTML,可以禁用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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