Wrox Programmer Forums
|
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 October 22nd, 2008, 08:09 AM
Registered User
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP code not executing

I have a page with following Code and it appears that the ASP code is not being executed.

<%@ Page Language="vb" %>
<script runat="server">

    Sub Load_Page ()
         Response.write ("First ASP.Net Line <br />")
         Response.Write ("Second ASP.NET Line <br />")
         Response.Write ("Third ASP.NET Line <br />")
    End Sub

</script>
<html>
<head>
    <title>Insert ASP.NET code Example</title>
</head>
<body>
    Line1: First HTML Line
    <br />
    Line2: Second HTML Line
    <br />
    Line1: Third HTML Line
    <br />
</body>
</html>



Results:

Line1: First HTML Line
Line2: Second HTML Line
Line1: Third HTML Line

 
Old October 22nd, 2008, 02:45 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Load Page is not an event within the page life cycle, it is simply a method you have created.

Try this:

Sub Page_Load(Sender as Object, E as EventArgs)
         Response.write ("First ASP.Net Line <br />")
         Response.Write ("Second ASP.NET Line <br />")
         Response.Write ("Third ASP.NET Line <br />")
End Sub

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems executing code Neal Access VBA 1 December 11th, 2006 04:07 AM
Problem executing code lagyossarian ASP.NET 2.0 Basics 0 April 20th, 2006 01:34 PM
Problem on executing code on server!! mkmaurya_it General .NET 0 February 11th, 2005 07:08 AM





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