bangaram27
Programmer
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
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