VS.Net颜色编码错误与内联代码 [英] VS.Net color coding bugs with inline code

查看:50
本文介绍了VS.Net颜色编码错误与内联代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在使用VS.Net 2002编写内联代码.aspx页面。颜色编码

似乎适用于VB.NET内联,而不是C#inline(见下文)。


有谁知道如何让这个适用于C#?


TIA,


JON



----------------------- -------------------


<%@ Page Language =" C#" %>


< script runat =" server">


private void Page_Load(object sender,System.EventArgs e)

{

//颜色编码不起作用 - 这条线是黑色的

}


< / script>

----------------------------------- -------

<%@ Page Language =" VB" %>


< script runat =" server">


Sub Page_Load(发件人为Object,e为EventArgs)

''颜色编码有效 - 此行为绿色

结束子


< / script>

------------------------------------------

Hi,

I am writing inline code .aspx pages using VS.Net 2002. The color coding
seems to work for VB.NET inline, and not for C# inline (see below).

Does anyone know how to get this working for C#?

TIA,

JON


------------------------------------------

<%@ Page Language="C#" %>

<script runat="server">

private void Page_Load(object sender, System.EventArgs e)
{
//color coding doesn''t work - this line is black
}

</script>
------------------------------------------
<%@ Page Language="VB" %>

<script runat="server">

Sub Page_Load(sender as Object, e as EventArgs)
''color coding works - this line is green
End Sub

</script>
------------------------------------------

推荐答案




仅支持VB的颜色编码。请参阅:

http://msdn.microsoft.com/library/en...sualStudio.asp


问候

Martin

" Jon Maz" <乔**** @ surfeuNOSPAM.de>在留言中写道

news:ud ************** @ TK2MSFTNGP10.phx.gbl ...
Hi,

Color coding is supported for VB only. See:

http://msdn.microsoft.com/library/en...sualStudio.asp

Greetings
Martin
"Jon Maz" <jo****@surfeuNOSPAM.de> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...

我正在使用VS.Net 2002编写内联代码.aspx页面。颜色编码似乎适用于VB.NET内联,而不适用于C#内联(见下文)。
<有谁知道如何让这个为C#工作?

TIA,

JON


----- -------------------------------------

<%@ Page语言= QUOT; C#" %>

< script runat =" server">

private void Page_Load(object sender,System.EventArgs e)
{
//颜色编码不起作用 - 这条线是黑色的

< / script>

--------- ---------------------------------

<%@ Page Language =" VB" %>

< script runat =" server">

''颜色编码工作原理 - 这条线是绿色的
结束子

< / script>

------------------ ------------------------

Hi,

I am writing inline code .aspx pages using VS.Net 2002. The color coding
seems to work for VB.NET inline, and not for C# inline (see below).

Does anyone know how to get this working for C#?

TIA,

JON


------------------------------------------

<%@ Page Language="C#" %>

<script runat="server">

private void Page_Load(object sender, System.EventArgs e)
{
//color coding doesn''t work - this line is black
}

</script>
------------------------------------------
<%@ Page Language="VB" %>

<script runat="server">

Sub Page_Load(sender as Object, e as EventArgs)
''color coding works - this line is green
End Sub

</script>
------------------------------------------



Whaaaaaaaaaaaaaaat?!?!?我希望那里的某个人有意义,

''因为它对我来说没有多大意义....


啊好吧,谢谢你让我知道,马丁。


:-(


JON


PS不要以为任何人都知道一个解决方法吗?
Whaaaaaaaaaaaaaaat?!?!? I hope that makes sense to *someone* out there,
''cos it don''t make much sense to me....

Ah well, thanks for letting me know, Martin.

:-(

JON

PS Don''t suppose anyone knows a workaround?


它只是偶然地在VB中工作(类似)。技术上既不是VS 2002也不是

VS 2003支持内联代码中的着色或智能感知。你看到的不是

VB颜色,它是vbscript颜色。* classic中的默认服务器脚本语言*

ASP是vbscript,这就是为什么< script runat =" server">使用

vbscript引擎进行着色。你可以使用jscript引擎来获得C#的颜色化

将页面默认服务器脚本设置为jscript。着色将是奇数

虽然:-)

谢谢

Mikhail Arkhipov(微软)

- 此帖子按原样提供,不提供任何保证d不授予任何权利。

10/11/04 7:39,文章#FSgD
It works (sort of) in VB simply by accident. Technically neither VS 2002 nor
VS 2003 support coloring or intellisense in inline code. What you see is not
VB color, it is vbscript color. Default server script language in *classic*
ASP is vbscript and that''s why <script runat="server"> is colorized using
vbscript engine. You can get colorization of C# using jscript engine by
setting page default server script to jscript. Colorization will be odd
though :-)
Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided ''AS IS'' with no warranties and confers no rights.
On 10/11/04 7:39, in article #FSgD


这篇关于VS.Net颜色编码错误与内联代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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