|
-
Nov 13th, 2002, 09:32 AM
#1
Thread Starter
Addicted Member
Bunch of garbage
Well, since I can't create a project where I want to, I shifted gears
and started on Wrox's Beginning ASP.NET. Everything you do
here is in notepad. So I wrote the code as follows:
<script language="vb" runat="server">
Sub Page_Load()
time.text=Hour(Now) & ":" & Minute(Now) & ":" & Second(Now)
End Sub
</script>
<html>
<head><title> The Punctual Web Server</title><head>
<Body>
<h1>Welcome</h1>
Time Is:
<asp:label id = "time" runat="server" />
</body>
</html>
The scripting part does not run. I view the source on the browser
and I see the script part when according to the tutorial it should
not be there because it would be executed on the server.
So I create a project and import this ASPX file and of course the IDE doesn't like any of this code. So it seems the aspx pages in the IDE are a lot different than if done in Notepad. This is all too
much mickey mouse to me. Whatever happened to KISS for
us stupid people?
This is getting really FRUSTRATING!!!!!
****All we are saying is give war a chance****
-
Nov 13th, 2002, 10:26 AM
#2
New Member
1. If ASP.NET is installed properly then your asp.net file must have a .aspx extension by default. You can add other extensions to IIS that it should send to asp.net.
2. Your book is showing you how to create an asp.net page with INLINE code. VS.NET uses the codebehind/pre-compiled model. Even so I don't know why it would have any major problems with inline code but ASP.NET Matrix is better suited to that anyway. No matter what you are better off with the compiled method from a speed point of view.
3. Don't do battle with .net over these things. There are simple explanations most of the time so count to 10 and relax
-
Nov 13th, 2002, 10:38 AM
#3
Thread Starter
Addicted Member
So...
So do I have to go to IIS administration and see if it is set
to run ASPX? I did create this page with an .aspx extension.
I wish I could relax......then I might IMplode.
****All we are saying is give war a chance****
-
Nov 13th, 2002, 10:54 AM
#4
First, make sure you dont try running your asp.net application on NT4, because it will not work.
If you are running it on Win98/Me, 2000 or XP then sounds like you dont have asp.net isapi setup properly or it's currupt.
Just run this from the command line:
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis -e
Note: make adjustments if this is not the path to your .net framework directory
-
Nov 13th, 2002, 10:59 AM
#5
Thread Starter
Addicted Member
Did that
Ok
I ran that command, still no go. The command flashed very quickly, can't tell if ti did anything.
Tom
****All we are saying is give war a chance****
-
Nov 13th, 2002, 11:04 AM
#6
It shouldn't have flashed quickly, it should take a minute or two. Open "cmd" and type the command again. You should see the .NET Framework title at the beginning.
-
Nov 13th, 2002, 11:06 AM
#7
Thread Starter
Addicted Member
This is waht displayed...
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
R:\>c:
C:\>C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis -e
Start removing the ASP.NET client side script files for this version (1.0.3705.0
)
Finished removing the ASP.NET client side script files for this version (1.0.370
5.0)
tom
****All we are saying is give war a chance****
-
Nov 13th, 2002, 12:35 PM
#8
now, pass the i switch to the command:
........\aspnet_regiis -i
This will restore the asapi for the IIS. Sorry, I should have told you that too
-
Nov 13th, 2002, 01:18 PM
#9
Also, make sure you have an @Page directive on your page as follows:
<%@Page Language="VB" AutoEventWireup="true" %>
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Nov 13th, 2002, 03:22 PM
#10
Thread Starter
Addicted Member
Hot Dang!
Putting that Line in my inline program did the trick.
Now tell me.. Why in the @3$53$#54&*!! is this not mentioned
in the damn book???
Thanks a bunch! Nice to end the day with problems resolved!
Tom
****All we are saying is give war a chance****
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|