Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 27th, 2004, 01:34 PM
Registered User
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jaideepc
Default The server side script is not send to the browser

I have just started practising ASP.NET, and while doing so, I faced a problem in the very first example from the book ASP.NET 1.1 with Visual Basic.Net. The problem is as follows:
When I view the following code in the browser, I can see only the part inside the HTML tag, and the scripted part is not send to the browser, please advice a solution to this,

<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>
In WebServerLand the time is currently:
<asp:label id="time" runat="server" />
</body>
</html>

I have all the tools loaded in my system required to run the code. PLease help

Jaideep

27-02-2004
New Delhi
India
 
Old February 27th, 2004, 04:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Try this:

1) Open a command window. (Click Start, click Run, type cmd, and then click OK.)
2) Navigate to the directory of the Aspnet_regiis.exe version you want to use. Remember that each version of the .NET Framework comes with its own version.

The file is usually located in the following directory:
for XP c:\windows\Microsoft.NET\Framework\<versionNumber>
for 2000 c:\winnt\microsoft.net\framework\<versionNumber>

Then type aspnet_regiis.exe -i

 
Old February 27th, 2004, 09:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Try this and see if it helps, changes made are in red:

-------------------------------------------------------

<%@ Page Language="vb" AutoEventWireup="true" Codebehind="WebForm1.aspx.vb" %>

<HTML>
<script language="vb" runat="server">
Sub Page_Load()
time.text=Hour(Now) & ":" & Minute(Now) & ":" & Second(Now)
End Sub
</script>
    <HEAD>
        <title>The Punctual Web Server</title>
    </HEAD>
    <body>
        <form id="Form1" method="post" runat="server">
                 <h1>Welcome</h1>
                  In WebServerLand the time is currently:
                  <asp:Label id="time" runat="server"></asp:Label>
        </form>
    </body>
</HTML>

-------------------------------------------------------

J
 
Old February 28th, 2004, 12:23 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Umm.... you SHOULDN'T see the scripted part in the browser's source HTML, that's kind of the point. The script runs at the server and you should only get HTML to the browser. Are you saying that what should be showing up as a RESULT of the script isn't there?

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX without server side script possible? suersh79 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 4 November 17th, 2006 01:55 AM
How to put a break point in server side script swagatika General .NET 0 September 22nd, 2005 09:15 AM
Passing information from server-side script mcinar Classic ASP Basics 4 January 24th, 2005 10:34 PM
passing information from server-side script mcinar HTML Code Clinic 2 January 24th, 2005 04:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.