Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error while running a .asp page

Status
Not open for further replies.

bangaram27

Programmer
Jul 14, 2007
2
US
Hi,

Iam new to ASP.NET.

I'm trying to run a simple ASP page.

which has following code

1
2 <!DOCTYPE html
3 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4 "5 <SCRIPT Language="vbscript" Runat="Server">
6
7 Sub Page_Load
8 DateOut.Text = "The current date and time are " & Now & "."
9 End Sub
10
11 Sub Display_Welcome (Src as Object, Args As EventArgs)
12 If NameIn.Text <> "" Then
13 WelcomeOut.Text = "Welcome, " & NameIn.Text & ", to the world of ASP.NET."
14 End If
15 End Sub
16 </SCRIPT>
17 <html xmlns=" xml:lang="en">
18 <body>
19 <form Runat="Server">
20
21 <asp:Label id="DateOut" Runat="Server"/><br/>
22 <br/>
23 Enter your first name: <br/>
24 <asp:TextBox id="NameIn" Runat="Server"/>
25 <asp:Button Text="Click Me" OnClick="Display_Welcome" Runat="Server"/><br/>
26 <br/>
27 <asp:Label id="WelcomeOut" Runat="Server"/>
28
29 </form>
30 </body>
31 </html>

I named it as ASPPage2.asp and copied it to C:\Inetpub\
And accessed as
I got following error

Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/ASPPage2.asp, line 12, column 25
Sub Display_Welcome (Src As Object, Args As EventArgs)
------------------------^


Can any one please help me?

Thanks,

Sindhu
 
Ah. I'll bet eventargs is an array. therefore:
Code:
11   Sub Display_Welcome (Src as Object, Args[COLOR=red]()[/color] As EventArgs)
See if that works.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top