473,657 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="htt p://www.w3schools.c om"
End Sub
</script><html><b ody><form runat="server"> <a id="link1" runat="server"> ABCDEF</a></form></body></html>
Nov 18 '05 #1
3 1552
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="htt p://www.w3schools.c om"
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*******@disc ussions.microso ft.com> wrote in message
news:30******** *************** ***********@mic rosoft.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="htt p://www.w3schools.c om"
End Sub
</script><html><b ody><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
2878
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 attribute. From what I understand the src attrib is standard ASP.NET but the codebehind attribute is only understood by VS.NET. Doesn't this make the pages (source code) less portable? Is there any reason for this? Hope someone can help.
4
7008
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 files alone in VS.NET is straightforward, but is there a way configure VS.NET to add aspx/ascx files alone?
2
1275
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 upload their HTML content and have the header/footer and side menu dynamically added on the page. I can create a .aspx file with controls for the header/footer and side menu and allow them to simply add the html content in the center of the...
3
1040
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 new Web server and go back to IIS or uninstall IIS? When I create a simple web site with a single web page with a button and a little bit of code for that button. When I run, I no longer see a "bin" file in solution explorer. Where did the...
3
4395
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 really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
2
1145
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 HTTP module is being executed before the .aspx page is compiled I was thinking it should be possible, but I can't seem to find a way. I was able to create the .aspx file physically using the
18
8361
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 support files). But essentially I don't want to have to deploy all the ASPXs, images, .js etc. Is there a way to achieve this? I seem to remember some sort of special ASP.NET marker file you could put in the application root which would tell it...
13
3542
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 some javascript code that calls window.open. I pass the resource url of page B to Page A's window.open call. Page B is then loaded and executed but none of the server-side code is rendered. If I view the source of the page, the code (and page...
2
6360
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 can I add *.ashx files to the publish target?
0
8399
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8312
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.