satishbeh
-
Total Posts
:
6
- Scores: 0
-
Reward points
:
0
- Joined: 7/31/2005
-
Status: offline
|
<% %> Render Blocks
Sunday, July 31, 2005 5:11 AM
( permalink)
I am using WinXp. I have installed IIS and am trying to use ASP. When I write some code using HTML the results appear on the browser. When I use any commands using render blocks i.e. <% %> nothing is dispalyed. For example when I enter the following: <html> <body> The date is now <%= Now() %> . </body> </html> The output is : The date is now . The date is not dispalyed. Can any one tell what the problem is. Regards, Satish
|
|
|
|
Snipah
-
Total Posts
:
1339
- Scores: 8
-
Reward points
:
0
- Joined: 11/1/2004
- Location: Scotland
-
Status: offline
|
RE: <% %> Render Blocks
Sunday, July 31, 2005 7:09 AM
( permalink)
Hiya Satishbeh. Are you saving your file as .ASP? Do you have your file under wwwroot? (or manually linked through Computer Managment (IIS))? Snipah PS my output is: The date is now 31-7-2005 20:10:39 . the file location i call is: http://localhost:8080/asp/date.asp
|
|
|
|
satishbeh
-
Total Posts
:
6
- Scores: 0
-
Reward points
:
0
- Joined: 7/31/2005
-
Status: offline
|
RE: <% %> Render Blocks
Monday, August 01, 2005 3:39 AM
( permalink)
The file is saved as .aspx and it is under wwwroot. Any text written out of the <% %> block is displayed. i.e. The date is <%= now() %> output : The date is The actual date is not displayed. Has it something to do with the browser. My browser is IE 6.0 I your reply you have entered 8080. What does that stand for ?
|
|
|
|
Snipah
-
Total Posts
:
1339
- Scores: 8
-
Reward points
:
0
- Joined: 11/1/2004
- Location: Scotland
-
Status: offline
|
RE: <% %> Render Blocks
Monday, August 01, 2005 8:02 AM
( permalink)
8080 is the port where my localhost is on, to use IIS on (Skype is hogging 80, so i had to change it) what is the full path what you open in your browser??? Try to rename it to .ASP and try it then....
|
|
|
|
satishbeh
-
Total Posts
:
6
- Scores: 0
-
Reward points
:
0
- Joined: 7/31/2005
-
Status: offline
|
RE: <% %> Render Blocks
Tuesday, August 02, 2005 6:11 AM
( permalink)
When I renamed the file to .asp it works. Can you tell me what is the different between .asp and .aspx? When should either be used?
|
|
|
|
Country73
-
Total Posts
:
754
- Scores: 10
-
Reward points
:
0
-
Status: offline
|
RE: <% %> Render Blocks
Tuesday, August 02, 2005 8:08 AM
( permalink)
The only thing I was able to find is that ASP.NET is referred to as ASPX. Here's a link that describes it a little more in detail. http://aerohost.com/aspx-net.htm
|
|
|
|
satishbeh
-
Total Posts
:
6
- Scores: 0
-
Reward points
:
0
- Joined: 7/31/2005
-
Status: offline
|
RE: <% %> Render Blocks
Thursday, August 04, 2005 4:18 AM
( permalink)
Does that mean that Asp.net does not support <% %> render blocks. Can you try using the same in a file by name .aspx and let me know the results.
|
|
|
|
Country73
-
Total Posts
:
754
- Scores: 10
-
Reward points
:
0
-
Status: offline
|
RE: <% %> Render Blocks
Thursday, August 04, 2005 7:23 AM
( permalink)
|
|
|
|
Zifter
-
Total Posts
:
315
- Scores: 0
-
Reward points
:
0
- Joined: 1/5/2005
- Location: Belgium
-
Status: offline
|
RE: <% %> Render Blocks
Wednesday, September 28, 2005 2:50 AM
( permalink)
Those <% %> blocks are no longer used in ASP.NET (althoug I think you still can use them) In ASP.NET you are supposed to put all your code into pages so called "code behind". These pages reside on the server side, thus you no longer need those <% %> blocks. The "code behind" pages can be written in VB.NET or C# or ... Providing a way to make your front end in HTML (ASP.NET) and your code in the language you prefer. I can't go into much detail about the differences between ASP and ASP.NET (both because I don't know enough about it and because it would be blogging in stead of posting on a forum), but there are lots of webpages convering this issue. Just do some googling.
|
|
|
|
venyaga
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 2/16/2006
-
Status: offline
|
RE: <% %> Render Blocks
Thursday, February 16, 2006 3:49 AM
( permalink)
Hi, I'm New Right Here But I know how fix your problem, try this --> <% response.write(now.tostring())%> Good Luck Venyaga
|
|
|
|
tt77v1
-
Total Posts
:
3
- Scores: 0
-
Reward points
:
0
- Joined: 4/13/2006
-
Status: offline
|
RE: <% %> Render Blocks
Thursday, April 13, 2006 9:06 PM
( permalink)
yes i think it is correct
|
|
|
|
Rischip
-
Total Posts
:
519
- Scores: 2
-
Reward points
:
0
- Joined: 3/26/2007
-
Status: offline
|
RE: <% %> Render Blocks
Wednesday, July 11, 2007 3:46 PM
( permalink)
You must create the "application" in IIS for it to render .aspx pages [image]local://13998/BB04411BDB4840E6A79E246970402F80.gif[/image]
<message edited by Rischip on Wednesday, July 11, 2007 3:49 PM>
|
|
|
|