how to create stand-alone page in VS

T

Tom Hartnett

Let's say that for whatever reason I want to write a simple ASPX page with
no code-behind; all the code will be in the SCRIPT tag. I don't want to
write out the code for the server controls in notepad, but I also don't want
to create a whole web app project in Visual Studio. Is it possible to
create a single ASPX page in Visual Studio, that is not part of a project,
and take advantage of VS drag & drop designer?
 
J

Janaka

Unfortuantely this is one of the drawbacks of the current VS.NET. You can
only follow its code-behind model.
Try ASP.NET Web Matrix though, its probably more what your looking for.
 
K

Keith

You can take the codebehind and inherits parameters off
of the @Page directive. You will then also need to show
all files and remove the code behind page.

Your @page directive will look similar to this...

<%@ Page language="c#" AutoEventWireup="false" %>

put your code where you want in the page, compile and run.

It works in this version and 1.0 also.

Good Luck,

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top