需要错误信息 [英] Need with Error Message

查看:76
本文介绍了需要错误信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始参加ASP.Net的入门课程,我正在尝试运行

a简单的程序,但仍然会出错。


我正在运行XP,安装了Internet信息服务(5.1),

Microsoft .Net Framework(英文)v1.0.3705和Microsoft .Net Framework SDK

(英语)v1.0a在我的电脑上。 Visual Studio .Net 2002也安装了




" http://localhost/day1/listing0104.aspx"放在

浏览器的地址行中。显示以下错误消息:


行:5

字符:5

错误:预期'';'''

代码:0

网址: http:/ /localhost/day1/listing0104.aspx


该程序如下:

<%@ Page Language =" VB" %>


< script runat =" server">


sub Page_Load(obj as object,e as eventargs)

lblMessage.text ="欢迎使用ASPNet! 

end sub


< / script>


< html>< body>

< asp:Label id =" lblMessage" runat =" server" />

< / body>< / html>


我的预感是.Net Framework 1.1可能有效比现在更好

1.0v。


关于导致错误的原因有什么想法吗?


谢谢你,

Mark

I''m just starting out in an introductory ASP.Net course, and am trying to run
a simple program but keeping getting an error.

I''m running XP, have installed Internet Information Services (5.1) ,
Microsoft .Net Framework (English) v1.0.3705 and Microsoft .Net Framework SDK
(English) v1.0a on my computer. Also Visual Studio .Net 2002 is also
installed.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Browser. The following error message displays:

Line: 5
Char: 5
Error: Expected '';''
Code: 0
URL: http://localhost/day1/listing0104.aspx

The program is a follows:
<%@ Page Language="VB" %>

<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>

<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>

My hunch is that the .Net Framework 1.1 might work better than the current
1.0v.

Any ideas as to what is causing the error?

Thank you,
Mark

推荐答案

怀疑你需要lang =" vb"在你的脚本标签中 - ;是javascript和

可能是您默认的客户端语言设置!


" Mark" <马** @ discussions.microsoft.com>在消息中写道

news:30 ********************************** @ microsof t.com ...
Suspect you need lang="vb" in your script tag - the ; is javascript and
may be your default client side language setting!

"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
我刚刚开始参加ASP.Net的入门课程,我正在尝试运行一个简单的程序,但一直都是错误的。

我正在运行XP,安装了Internet信息服务(5.1),微软.Net Framework(英文)v1.0.3705和Microsoft .Net Framework
SDK
(英文)v1.0a在我的电脑上。还安装了Visual Studio .Net 2002.

" http://localhost/day1/listing0104.aspx"放在
浏览器的地址行中。显示以下错误消息:

行:5
字符:5
错误:预期'';''
代码:0
URL:< a rel =nofollowhref =http://localhost/day1/listing0104.aspxtarget =_ blank> http://localhost/day1/listing0104.aspx

该程序如下:
<%@ Page Language =" VB" %>

<脚本runat ="服务器">

lblMessage.text =" ;欢迎来到ASPNet!"
结束子

< / script>

< html>< body>
< asp:标签ID =" lblMessage" runat =" server" />
< / body>< / html>

我的预感是.Net Framework 1.1可能比现在更好用
1.0v。

关于导致错误的原因有什么想法吗?

谢谢,
Mark
I''m just starting out in an introductory ASP.Net course, and am trying to
run
a simple program but keeping getting an error.

I''m running XP, have installed Internet Information Services (5.1) ,
Microsoft .Net Framework (English) v1.0.3705 and Microsoft .Net Framework
SDK
(English) v1.0a on my computer. Also Visual Studio .Net 2002 is also
installed.

"http://localhost/day1/listing0104.aspx" is placed in the address line of
Browser. The following error message displays:

Line: 5
Char: 5
Error: Expected '';''
Code: 0
URL: http://localhost/day1/listing0104.aspx

The program is a follows:
<%@ Page Language="VB" %>

<script runat="server">

sub Page_Load(obj as object, e as eventargs)
lblMessage.text = "Welcome to ASPNet!"
end sub

</script>

<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>

My hunch is that the .Net Framework 1.1 might work better than the current
1.0v.

Any ideas as to what is causing the error?

Thank you,
Mark



Mark,


您的代码对我来说很好。可疑的是;是C#中的一行

终止符。你确定你使用的是VB编译器吗?

希望这有帮助

-------------------- ----
Mark,

Your code looks fine to me. What is suspicious is that the ";" is a line
terminator in C#. Are you sure that you are using the VB compiler?
Hope this helps
------------------------


感谢Brian - 我在想C ++(C ++也使用'';'')。


所以我尝试了该程序的C#再现。出现以下错误:


行:3

字符:23

Erro:预期'')''

代码:0

URL http:// localhost / day1 / listing0103.aspx


C#代码:

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

< script runat =" server">

void Page_Load(Object obj,EventArgs e)

{

lblMessage.text ="欢迎来到ASPNet!" ;;

}

< / script>

< ; html>< body>

< asp:Label id =" lblMessage" runat =" server" />

< / body>< / html>


还有什么想到的吗?

谢谢你,马克

" Brian Brown"写道:
Thanks Brian - I was thinking C++ (C++ uses '';'' too).

So I tryed a C# rendition of the program. The following error came up:

Line: 3
Char: 23
Erro: expected '')''
Code: 0
URL http://localhost/day1/listing0103.aspx

C# code:
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object obj, EventArgs e)
{
lblMessage.text = "Welcome to ASPNet!";
}
</script>
<html><body>
<asp:Label id="lblMessage" runat="server"/>
</body></html>

Anything else come to mind?
Thanks, Mark
"Brian Brown" wrote:
Mark,

您的代码对我来说很好。可疑的是;是C#中的一行终结符。你确定你使用的是VB编译器吗?

希望这有助于
------------------------
Mark,

Your code looks fine to me. What is suspicious is that the ";" is a line
terminator in C#. Are you sure that you are using the VB compiler?
Hope this helps
------------------------



这篇关于需要错误信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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