WebForm1.aspx / default.aspx

  • Thread starter Thread starter Ted Apollo
  • Start date Start date
T

Ted Apollo

When I develop my ASP.NET 1.1 application locally, the default form is
always "WebForm1.aspx." However, when I post the same application to a web
server, the default becomes "default.aspx."

Why is this and how can I change the default from "WebForm1.aspx" to
"default.aspx?"

Thanks,
Ted Apollo
 
Ted said:
When I develop my ASP.NET 1.1 application locally, the default form is
always "WebForm1.aspx." However, when I post the same application to
a web server, the default becomes "default.aspx."

Why is this and how can I change the default from "WebForm1.aspx" to
"default.aspx?"

WebForm1.aspx is simply the first page of a web project and thus set to be
start page as far as VS .NET is concerned. default.aspx is a true start page
(i.e. invoked when there's no file specified in the URI). This is an IIS
setting and can be edited to include any other name you want.

Cheers,
 
Thanks, Joerg

Two follow-up questions though. Can the default first page of a web project
in VS.NET be changed to "default.aspx" instead of "WebForm1.aspx?"

Also, regarding IIS, could you tell me how to set the default page?

Thanks again,
Ted Apollo
 
Hi,

AFAIK you can't specify the default page name for new pages in VS.NET.
To alter your default page in IIS, go to the properties for your application
or virtual directory, and choose the 'Documents' tab. You will see the
default document settings with which you can add or remove documents and
reorder them for priority.
 
Got it. Thanks!

Ted Apollo

Ben Lovell said:
Hi,

AFAIK you can't specify the default page name for new pages in VS.NET.
To alter your default page in IIS, go to the properties for your application
or virtual directory, and choose the 'Documents' tab. You will see the
default document settings with which you can add or remove documents and
reorder them for priority.
 
Ted said:
Thanks, Joerg

Two follow-up questions though. Can the default first page of a web
project in VS.NET be changed to "default.aspx" instead of
"WebForm1.aspx?"

I'm not sure. Maybe if you mess around with its project templates. What I
normally do is delete WebForm1.aspx and create a new one with a proper
name -- this is faster than renaming both the file and the code-behind
class. I do the same in the Windows Forms designer as well.
Also, regarding IIS, could you tell me how to set the default page?

See Ben's reply.

Cheers,
 
Back
Top