how to create stand-alone page in VS

  • Thread starter Thread starter Tom Hartnett
  • Start date Start date
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?
 
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.
 
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
 
Back
Top