|
 |
aspx_beginners thread: RE: Hello World
Message #1 by "Mrinal Srivastava" <mrinal.srivastava@p...> on Tue, 13 Aug 2002 12:40:45 +0530
|
|
Thanks,
That cleared a lot of issued. But the question as to why my code isn't
running still remains.
:-(
here is the code again.
<%@ Page Language="C#" %>
<html>
<head>
</head>
<body>
<% for (int i=0; i<10; i++) {
Console.WriteLine("Mrinal <BR>");
} %>
</body>
</html>
-----Original Message-----
From: Hovik Melkomian [mailto:melvik@b...]
Sent: Tuesday, August 13, 2002 11:56 AM
To: aspx_beginners
Subject: [aspx_beginners] Re: img source href
Dear Friend:
Fisrt dont be up set cuz all r not perfessional at first.
Then, when u r useing ur IIS as web server it works under a location.
u work with a Virtual Directory: It means u have a directory like
D:\PAGES then u give a name (alias) to it as PG OK!?!?
Then since u r working under ur IIS, u'll use ur localhost.
so, now u have a Folder (D:\PAGES) & an alias to it in IIS (PG)
u'll put ur pages in ur filder & to access them just write
\\localhost\pg it'll access ur default page in IIS witch normally is
index.htm, index.asp, default.htm, default.asp to use aspx files as
a default page make them set in ur IIS setup.
eg: to access a page like form.aspx in ur PG virsualDirectory use
\\localhost\pg\form.aspx
thats all,
Hovik.
----- Original Message -----
From: "Mrinal Srivastava" <mrinal.srivastava@p...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, August 13, 2002 10:50 AM
Subject: [aspx_beginners] Re: img source href
Hi,
Here is a real beginner's question.
If I'm suign IIs as my webserver, where should I physically store my aspx
pages and how to access them?
And next question is, Why isn't this code working.
<%@ Page Language="C#" %>
<html>
<head>
</head>
<body>
<% for (int i=0; i<10; i++) {
Console.WriteLine("Mrinal <BR>");
} %>
</body>
</html>
Please respond once you are done laughing at this stupid question.
:-)
Regards
Message #2 by "Hovik Melkomian" <melvik@b...> on Tue, 13 Aug 2002 11:50:23 +0430
|
|
Have u woked with ASP 3.0 ?!?!
ASP.NET is not like that.
ur scripts will work in ur <script> & </script> tags
ur code will be like below:
<%@ Page Language="C#" %>
<Script Runat="Server">
void Page_Load( Object s, EventArgs e )
{
for (int i=0; i<10; i++)
Response.Write("Mrinal <BR>");
}
</Script>
u do not need any HTML or BODY or HEAD in this example.
1 more thing: to write something in browser Console.WriteLine
is not a way use Response.Write.
its ASP no Windows App.
Thats all,
Hovik.
----- Original Message -----
From: "Mrinal Srivastava" <mrinal.srivastava@p...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, August 13, 2002 11:40 AM
Subject: [aspx_beginners] RE: Hello World
Thanks,
That cleared a lot of issued. But the question as to why my code isn't
running still remains.
:-(
here is the code again.
<%@ Page Language="C#" %>
<html>
<head>
</head>
<body>
<% for (int i=0; i<10; i++) {
Console.WriteLine("Mrinal <BR>");
} %>
</body>
</html>
-----Original Message-----
From: Hovik Melkomian [mailto:melvik@b...]
Sent: Tuesday, August 13, 2002 11:56 AM
To: aspx_beginners
Subject: [aspx_beginners] Re: img source href
Dear Friend:
Fisrt dont be up set cuz all r not perfessional at first.
Then, when u r useing ur IIS as web server it works under a location.
u work with a Virtual Directory: It means u have a directory like
D:\PAGES then u give a name (alias) to it as PG OK!?!?
Then since u r working under ur IIS, u'll use ur localhost.
so, now u have a Folder (D:\PAGES) & an alias to it in IIS (PG)
u'll put ur pages in ur filder & to access them just write
\\localhost\pg it'll access ur default page in IIS witch normally is
index.htm, index.asp, default.htm, default.asp to use aspx files as
a default page make them set in ur IIS setup.
eg: to access a page like form.aspx in ur PG virsualDirectory use
\\localhost\pg\form.aspx
thats all,
Hovik.
----- Original Message -----
From: "Mrinal Srivastava" <mrinal.srivastava@p...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, August 13, 2002 10:50 AM
Subject: [aspx_beginners] Re: img source href
Hi,
Here is a real beginner's question.
If I'm suign IIs as my webserver, where should I physically store my aspx
pages and how to access them?
And next question is, Why isn't this code working.
<%@ Page Language="C#" %>
<html>
<head>
</head>
<body>
<% for (int i=0; i<10; i++) {
Console.WriteLine("Mrinal <BR>");
} %>
</body>
</html>
Please respond once you are done laughing at this stupid question.
:-)
Regards
Message #3 by Imar@S... on Tue, 13 Aug 2002 08:41:34
|
|
Hi there,
There is no Console in a Web application, so you can't write to it. You
can only output to the console in a console application. ;-)
To output in a web app, use Response.Write
I saw you other post regarding response.write: I think your problem is
caused by the fact that C# is case sensitive while VB.NET isn't. So in
VB.NET you can get away with using response.write, while in C# you HAVE to
use Response.Write
HtH
Imar
> Thanks,
That cleared a lot of issued. But the question as to why my code isn't
running still remains.
:-(
here is the code again.
<%@ Page Language="C#" %>
<html>
<head>
</head>
<body>
<% for (int i=0; i<10; i++) {
Console.WriteLine("Mrinal <BR>");
} %>
</body>
</html>
|
|
 |