使用ASP.NET控件不会保留空格。 [英] Use of ASP.NET control does not preserve whitespace.

查看:51
本文介绍了使用ASP.NET控件不会保留空格。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

又一个编辑问题


要重现,请执行以下操作


1)打开Webform并切换到HTML编辑模式


2)输入以下内容(包含空格)

这是< asp:hyperlink id =" hl1"之前的一些文字。 runat =" server"

navigateurl =" http://www.microsoft.com">这是我的链接< / asp:hyperlink>并且

这是超链接后的文字


3)切换回设计模式。

注意,空间已经删除超链接和单词

"和"


4)现在,在设计模式下,在超链接和

word""


5)切换回HTML编辑模式并注意IDE放置了& nbsp;你键入空格字符



这并不总是一个可接受的解决方法。

要证明这只发生在ASP.NET控件上,执行以下

空间


1)再次以HTML编辑模式打开Webform


2)输入以下(包括空格)

这是< a href =" http://www.microsoft.com">之前的一些文字这是

我的HTML超级链接< / A>此文本出现在HTML超链接之后。


3)切换到设计模式

注意超链接和单词And之间的空格。

保留,没有& nbsp;插入字符。

任何建议?


TIA


问候

Brian W

解决方案

我注意到同样的问题......有时候不方便。

但是,我不明白为什么插入& nbsp;角色

不是一个可接受的解决方法吗?再敲几下键吧:

" Brian W" < brianw@gold_death_2_spam_rush.com>在消息中写道

新闻:O1 ************** @ TK2MSFTNGP12.phx.gbl ...

又一个编辑问题

要重现以下内容

1)打开Webform并切换到HTML编辑模式

2)输入以下内容(包括空格) navigateurl =" http://www.microsoft.com">这是我的链接< / asp:hyperlink>并且这是我在Hyperlink之后的文字

3)切换回设计模式。
请注意,超链接和
字之间的空格已被删除;和

4)现在,在设计模式下,在超链接和
之间键入空格字符,单词And

5)切换回HTML编辑模式并注意IDE放置了一个& nbsp;
你键入空格字符。
这并不总是一个可接受的解决方法。

要证明这只发生在ASP.NET控件上,请执行以下操作
空间

1)再次以HTML编辑模式打开Webform

2)输入以下内容(包含空格)
这是< a href =之前的一些文本" http://www.microsoft.com">这个
是我的HTML超链接< / a>此文本出现在HTML超链接之后。

3)切换到设计模式
注意超链接和单词And之间的空格。是保留,没有& nbsp;插入字符。

有什么建议吗?

TIA

问候
Brian W


感谢您的评论,Cliff。


不,我说......并不总是可以预期的解决方法


它与键入& nbsp;的击键次数无关。

有一个不间断的空间和没有一个空间之间的区别可能在

有些情况下,你的布局看起来不错和看起来很好

喜欢垃圾;-)


问候

Brian W

" Cliff Harris" <他*** @ myrealbox.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...

我有注意到了同样的问题......有时候不方便。
但是,我不明白为什么插入& nbsp;人物
是不是一个可接受的解决方法?再敲几下键吧:

" Brian W" < brianw@gold_death_2_spam_rush.com>在消息中写道
新闻:O1 ************** @ TK2MSFTNGP12.phx.gbl ...

又一个编辑问题
<要重现,请执行以下操作

1)打开Webform并切换到HTML编辑模式

2)输入以下内容(包含空格)
这是< asp:hyperlink id =" hl1"之前的一些文字runat =" server"
navigateurl =" http://www.microsoft.com">这是我的链接< / asp:hyperlink>
这是我在Hyperlink之后的文字

3)切换回设计模式。
请注意,超链接和

之间的空格已被删除/> word

"和

4)现在,在设计模式下键入超链接和

之间的空格字符

word"和

5)切换回HTML编辑模式并注意IDE放置了& nbsp;
您键入空格字符。
这并不总是一个可接受的解决方法。

要证明这只发生在ASP.NET控件上,请执行以下
空间

1)再次以HTML编辑模式打开Webform

2)输入以下内容(包含空格)
这是< a href =之前的一些文本" http://www.microsoft.com">这个


我的HTML超链接< / a>此文本出现在HTML超链接之后。

3)切换到设计模式
注意超链接和单词And之间的空格。是保留,没有& nbsp;插入字符。

有什么建议吗?

TIA

问候
Brian W



当我在编辑主题上时...


为什么编辑器会改变& ;复制;至 ? ?


我知道他们的意思是一样的,但实际上会是什么?字符是

在浏览器中被识别?


问候

Brian W


" ; Brian W" < brianw@gold_death_2_spam_rush.com>在消息中写道

新闻:O1 ************** @ TK2MSFTNGP12.phx.gbl ...

又一个编辑问题

要重现以下内容

1)打开Webform并切换到HTML编辑模式

2)输入以下内容(包括空格) navigateurl =" http://www.microsoft.com">这是我的链接< / asp:hyperlink>并且这是我在Hyperlink之后的文字

3)切换回设计模式。
请注意,超链接和
字之间的空格已被删除;和

4)现在,在设计模式下,在超链接和
之间键入空格字符,单词And

5)切换回HTML编辑模式并注意IDE放置了一个& nbsp;
你键入空格字符。
这并不总是一个可接受的解决方法。

要证明这只发生在ASP.NET控件上,请执行以下操作
空间

1)再次以HTML编辑模式打开Webform

2)输入以下内容(包含空格)
这是< a href =之前的一些文本" http://www.microsoft.com">这个
是我的HTML超链接< / a>此文本出现在HTML超链接之后。

3)切换到设计模式
注意超链接和单词And之间的空格。是保留,没有& nbsp;插入字符。

有什么建议吗?

TIA

问候
Brian W


Yet another editor problem

To reproduce do the following

1) Open a Webform and switch to HTML edit mode

2) Enter the Following (include spaces)
This is some text before <asp:hyperlink id="hl1" runat="server "
navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And
this is my text after the Hyperlink

3) Switch back to design mode.
Notice, the space has been remove between the hyperlink and the word
"And"

4) Now, in design mode type a space character between the hyperlink and the
word "And"

5) Switch back to HTML edit mode and notice the IDE placed a &nbsp; where
you typed the space character.
This is not always an acceptable workaround.
To prove this only happens with the ASP.NET control, perform the following
space

1) Open the Webform in HTML edit mode again

2) Enter the following (include spaces)
This is some text before <a href="http://www.microsoft.com">This is
my HTML hyperlink</a> And this text appears after the HTML hyperlink.

3) Switch to design mode
Notice the space between the hyperlink and the word "And" is
retained, and no &nbsp; characters are inserted.
Any recommendations?

TIA

Regards
Brian W

解决方案

I have noticed the same problem... it is, at times, inconvenient.
However, I do not understand why inserting an &nbsp; character
isn''t an acceptable workaround? Just a few more keystrokes :)
"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:O1**************@TK2MSFTNGP12.phx.gbl...

Yet another editor problem

To reproduce do the following

1) Open a Webform and switch to HTML edit mode

2) Enter the Following (include spaces)
This is some text before <asp:hyperlink id="hl1" runat="server "
navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And
this is my text after the Hyperlink

3) Switch back to design mode.
Notice, the space has been remove between the hyperlink and the word "And"

4) Now, in design mode type a space character between the hyperlink and the word "And"

5) Switch back to HTML edit mode and notice the IDE placed a &nbsp; where
you typed the space character.
This is not always an acceptable workaround.
To prove this only happens with the ASP.NET control, perform the following
space

1) Open the Webform in HTML edit mode again

2) Enter the following (include spaces)
This is some text before <a href="http://www.microsoft.com">This is my HTML hyperlink</a> And this text appears after the HTML hyperlink.

3) Switch to design mode
Notice the space between the hyperlink and the word "And" is
retained, and no &nbsp; characters are inserted.
Any recommendations?

TIA

Regards
Brian W



Thanks for your comments, Cliff.

No, I said "...not ALWAYS an expectable workaround"

It has nothing to do with the number of keystrokes to type "&nbsp;" The
difference between having a non-breaking space and not having one could in
some cases make a difference between your layout looking good and looking
like crap ;-)

Regards
Brian W
"Cliff Harris" <he***@myrealbox.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...

I have noticed the same problem... it is, at times, inconvenient.
However, I do not understand why inserting an &nbsp; character
isn''t an acceptable workaround? Just a few more keystrokes :)
"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:O1**************@TK2MSFTNGP12.phx.gbl...

Yet another editor problem

To reproduce do the following

1) Open a Webform and switch to HTML edit mode

2) Enter the Following (include spaces)
This is some text before <asp:hyperlink id="hl1" runat="server "
navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And this is my text after the Hyperlink

3) Switch back to design mode.
Notice, the space has been remove between the hyperlink and the


word

"And"

4) Now, in design mode type a space character between the hyperlink and


the

word "And"

5) Switch back to HTML edit mode and notice the IDE placed a &nbsp; where you typed the space character.
This is not always an acceptable workaround.
To prove this only happens with the ASP.NET control, perform the following space

1) Open the Webform in HTML edit mode again

2) Enter the following (include spaces)
This is some text before <a href="http://www.microsoft.com">This


is

my HTML hyperlink</a> And this text appears after the HTML hyperlink.

3) Switch to design mode
Notice the space between the hyperlink and the word "And" is
retained, and no &nbsp; characters are inserted.
Any recommendations?

TIA

Regards
Brian W




While I''m on the editor subject...

Why does the editor change &copy; to ? ?

I know they mean the same thing, but would the actual ? character be
recognized accross browsers?

Regards
Brian W

"Brian W" <brianw@gold_death_2_spam_rush.com> wrote in message
news:O1**************@TK2MSFTNGP12.phx.gbl...

Yet another editor problem

To reproduce do the following

1) Open a Webform and switch to HTML edit mode

2) Enter the Following (include spaces)
This is some text before <asp:hyperlink id="hl1" runat="server "
navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And
this is my text after the Hyperlink

3) Switch back to design mode.
Notice, the space has been remove between the hyperlink and the word "And"

4) Now, in design mode type a space character between the hyperlink and the word "And"

5) Switch back to HTML edit mode and notice the IDE placed a &nbsp; where
you typed the space character.
This is not always an acceptable workaround.
To prove this only happens with the ASP.NET control, perform the following
space

1) Open the Webform in HTML edit mode again

2) Enter the following (include spaces)
This is some text before <a href="http://www.microsoft.com">This is my HTML hyperlink</a> And this text appears after the HTML hyperlink.

3) Switch to design mode
Notice the space between the hyperlink and the word "And" is
retained, and no &nbsp; characters are inserted.
Any recommendations?

TIA

Regards
Brian W



这篇关于使用ASP.NET控件不会保留空格。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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