Subject: Which page is the project start page?
Posted By: VictorVictor Post Date: 2/16/2006 11:43:45 AM
Does anyone know how you can tell, short of starting the project (VWD site) how one can tell beforehand which aspx page has been designated as the start page?

In my Solution Explorer neither the main app nor any aspx has such a property.  That bit of info must be stored somewhere, but I can't find it.

It would have been nice if the VWD designers would have made the start page name appear in the Solution Explorer list in bold font, or appended an asterisk or something.

Anyone?   Thanks

VV


Reply By: bmains Reply Date: 2/16/2006 1:00:35 PM
Hey,

Not that I know of; I usually just right-click set as start whenever I'm unsure.  Even if it is already set, it doesn't error.

Brian
Reply By: Imar Reply Date: 2/16/2006 1:36:28 PM
I don't think there's a way to visually tell what page is the default if you have set one explicitly.

However, the default for VWD is "Current Page". This means it tries to open the current active file. If that's a code behind file, it tries to open the associated .aspx file. If tat doesn't work, it opens at the root of the site.

For me, this works a lot better than the VS.NET 2003 fixed starr page option, as usually running the current page is exactly what I want...

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply By: VictorVictor Reply Date: 2/28/2006 1:14:43 PM
I note that the web.config file has an <authentication> block
and within that the <forms> tag, which has a loginURL attribute.
The page specified for the attribute for the app is Default.aspx.
The start page can be overridden simply by right clicking on the
desired start page in the project explorer.

NOTE that in so doing, the loginURL attribute IS NOT CHANGED.
This is certainly misleading for anyone who comes behind you when
the code is modified or enhanced!

VV 2/28/06

Reply By: Imar Reply Date: 2/28/2006 1:22:13 PM
I am not sure I understand what you're saying here.

Why would loginUrl be changed when you change the start page? And why is this misleading?

Maybe you're misunderstanding the purpose of the loginUrl attribute?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply By: VictorVictor Reply Date: 2/28/2006 1:35:00 PM
I noted in reviewing chapter 2, that the \authentication\forms\loginURL string
specifies which page is for login.  Maybe I do misunderstand. It appears to me
that that string would specify where the app begins -- at least for login and
login is where one would normally start, no?

VV

Reply By: Imar Reply Date: 2/28/2006 1:40:38 PM
No, not necessarily.

Default.aspx is often where you start. That is, you browse to www.yourdomain.com/ and then default.aspx is server automatically (because it's the default document for the web server).

Take for example my own web site. 90% of the site is accessible by unauthenticated users. Most of them will never see the Login.aspx page. However, as soon as you try to access a protected page, the ASP.NET runtime transfers you to Login.aspx (or any other page specified in the loginUrl attribute).
So, the setting is for run-time behavior, not for development time....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply By: VictorVictor Reply Date: 2/28/2006 1:45:52 PM
I understand.  You are right.
For a moment there I thought I had found where ASP.NET stores the name
of the page to start with.  Darn....  Thanks.
VV


Reply By: Imar Reply Date: 2/28/2006 2:59:31 PM
I am not 100% sure, but I think this setting is saved in the .suo (Solution User Options file) that is saved together with the .sln (Solution) file for your web project / solution.

Since the start page is a per user setting, that would be an ideal location....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply By: VictorVictor Reply Date: 2/28/2006 3:17:08 PM
Imar:
Sounds like just the place that info should be stored.
However, I cannot find any kind of file that ends with .suo or .sln on my
machine and I opened up the Windows Explorer to show hidden files and system
protected files -- everything.  ???
VV


Reply By: Imar Reply Date: 2/28/2006 4:14:22 PM
By default, that file is stored under My Documents\Visual Studio 2005\Projects\YourSolutionOrProjectName

However, the file is not human readable. You can recognize some of its content, but not much, and you certainly can't write to it.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply By: VictorVictor Reply Date: 3/1/2006 12:07:15 AM
Imar:
I'm using Visual Web Developer 2.0 Express, not VS 2005.  So, probably
that is why I don't have the file.

I'll just have to live with starting a project to see what page comes up
as the start page.  Not a big deal.  Thanks for your effort and research.

VV


Reply By: Imar Reply Date: 3/1/2006 2:19:43 AM
Look in the Options under Projects and Solutions. You have the option to "Always show solution". Once you check that, you see the solution appear in the Solution Explorer.

From there, you can see where it's saved...


But if I were you, I'd drop the concept of a fixed starting page. This was a huge problem in VS.NET 2003, but now in VS 2005, things are so much easier. When you press (Ctrl+) F5, you get the page you currently have open. In 99,9 of the cases, that's exactly what you want. In the other situation, just open the file from the Solution  Explorer...

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.

Go to topic 40644

Return to index page 356
Return to index page 355
Return to index page 354
Return to index page 353
Return to index page 352
Return to index page 351
Return to index page 350
Return to index page 349
Return to index page 348
Return to index page 347