WebForm1.aspx / default.aspx

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
 
J

Joerg Jooss

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,
 
T

Ted Apollo

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
 
B

Ben Lovell

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.
 
T

Ted Apollo

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.
 
J

Joerg Jooss

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,
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top