473,395 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Does an .aspx file need to be compiled before being used?

The following page.aspx is a very simple sample. But when I try to load it, it just prints 'ABCDED' as against making it a link. So, I was wondering if this file will first need to be compiled before being used. And if it needs to be compiled, how to do it? I have only .NET framework SDK. Don't have Visual Studio.NET yet.

Thanks in advance for any help.

<script runat="server">
Sub Page_Load
link1.HRef="http://www.w3schools.com"
End Sub
</script><html><body><form runat="server"><a id="link1" runat="server">ABCDEF</a></form></body></html>
Nov 18 '05 #1
3 1542
You need to tell it that it is an ASPX page with the @Page directive. I also
added a line to change the displayed text.

Compilation is not required unless you are using code behind. It will
compile automatically if you also add the Src= attribute.

<%@ Page Language="vb" AutoEventWireup="true" %>
<html>
<script runat="server">
Sub Page_Load
link1.href="http://www.w3schools.com"
link1.innerText = "W3 School"
End Sub
</script>
<body>
<form runat="server" id="Form1">
<a id="link1" runat="server">ABCDEF</a></form>
</body>
</html>
"Connie Edwards" <an*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
The following page.aspx is a very simple sample. But when I try to load it, it just prints 'ABCDED' as against making it a link. So, I was wondering
if this file will first need to be compiled before being used. And if it
needs to be compiled, how to do it? I have only .NET framework SDK. Don't
have Visual Studio.NET yet.
Thanks in advance for any help.

<script runat="server">
Sub Page_Load
link1.HRef="http://www.w3schools.com"
End Sub
</script><html><body><form runat="server"><a id="link1"

runat="server">ABCDEF</a></form></body></html>
Nov 18 '05 #2
Thanks Jim for the reply, but it hasn't helped yet. I still get the same results.
I am now beginning to wonder if ASP.NET is installed correctly on my machine. I have every reason to believe it has. I have IIS up and running, and selected every possible option in Add/Remove dialog box for IIS. Is there any switch in IIS (or at any other place) that I will need to turn on in order to get ASP.NET to work??

Again, thanks in advance for any help.
C.E
Nov 18 '05 #3
I think I found the problem. It was probably an installation issue. After reinstall, things now work.
Thanks again.
C.E
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Graham Allwood | last post by:
I'm reading the Essential ASP.NET book by Fritz onion and he says that when VS.NET creates a new .aspx page for you is uses the codebehind attribute on the Page directive rather than the src...
4
by: BH | last post by:
I'm looking at the source code of the ASP.NET forum sample application. It has the "code-behind" classes compiled into a separate DLL, totally separated from the aspx/ascx files. Adding the class...
2
by: Mike Dobson | last post by:
I have created an application that will be compiled and deployed to a web server. The users have also requested the ability to upload files to the web server via FTP. They would like to be able to...
3
by: Jim Heavey | last post by:
I was using VS 2003 and I installed VS 2005. It appears that VS 2005 installs it's own web server. Does this mean I no longer need IIS (Win XP Pro version) on my machine? Should I uninstall the...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
2
by: KN | last post by:
Hello, Is it possible to provide the .aspx mark up to the buildmanager from a resource for compilation and load it whithout having the .aspx file in the virtual folder? Since, the registered...
18
by: Boris Yeltsin | last post by:
I'm using a Web Deployment Project under Visual Studio 2005. What I would love to be able to deploy to a fresh server is just the \bin folder and the web.config (and perhaps a couple of other...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
2
by: Max2006 | last post by:
Hi, After I right-click on my web application project file and choose "Publish ." and do the publishing, the result publishable files does not include the *.ashx files. Is it by design? How...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.