0

I am debugging a web form application using Microsoft Visual Studio. Normally there are a number of pages displayed, starting with default.aspx, in sequence after certain buttons have been pressed on each. The default page has been set to default.aspx. When I start the application using the debugger it brings up the third page in the sequence rather than starting at default.aspx. Is some information being stored in the background that influences which pages are presented first?

odbdux
  • 43
  • 9

1 Answers1

0

Check the web tab of your project. During working and debugging, I MUCH perfer that VS launches the page I am working on. (what else would one want it to do????).

I mean, in some cases, sure, the page and testing of code must start from a known page. Then of course the user does things, sesson() vars etc. get set, and thus just "jumping" right into a page does not really allow you to correctly test your code or even launch that page out of sequence - so I well get this part and issue.

However, once logged in, (and the site remembers me), there is OFTEN a major page or part of some sub form that makes sense for me to startout on. And often a LOT of the pages I am working on "can" be launched without starting 5 web pages back.

So in "most" cases? I make some changes to code - whack the F5, and the code is compiled, and then VS launches the page I am on. This is without question what want to occur in 9 out of 10 times. And I often place in some respones.Redirects() in the page load event, since it NOT ONLY ME that has a problem by jumping to the wrong page. What if your users type in that URL too? They are free to do so!!! So, if YOUR development process is messed up by staring out on the page you are working on? Then 99% of the time, the your USERS ALSO can launch that web page and ALSO get messed up!

So, developing on a given page, hitting F5 to launch that page? It is a great default since you then over the development cycle get to catch funny errors when launching a page that you normally would not launch as your starting point.

And, as noted, often it might take 5 clicks and you traversing 5 pages to GET to the current page you are working on. If that page "can" be launched out of sequence, then you save buckets of pain during the development process.

So common is the above? Well, not only does hitting F5 just "start" your current page?

There is also this setting from the project menu:

enter image description here

So, VS makes this VERY easy to change.

But, the F5 behavior (current page you are developing on?) and standard place to change this behavior is here under the projects menu:

enter image description here

So, you can change this behavior quite easy, and there are several options as you can see above. You can even choose to not start a page.

So, the default is the current page you are working on, and in most cases this is what most developers prefer. However, as above shows, you have several options to change this.

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51