470,586 Members | 1,349 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,586 developers. It's quick & easy.

aspx page changes not picked up by debugger unless do "Rebuild Solution"

If I create a new C# Web Project in Visual Studio and add this to the
Page_Load method for WebForm1:

Response.Write("firsttime");

then hitting F5 to debug the project of course shows the WebForm with
"firsttime" on the page.

But if I then change it to Response.Write("secondtime") and hit F5,
the changes don't take effect -- the WebForm still opens and displays
"firsttime". Even if I do "Build->Build Solution" and then hit F5,
the WebForm still displays "firsttime". It's only if I do
Build->*Rebuild* Solution and then debug, that the changes take effect
and I see "secondtime".

I haven't used Visual Studio much before doing ASP.Net but this seems
inconsistent with the way all other kinds of projects work. In
general, if you modify one of the source files and hit F5, the changes
take effect -- the source is saved and the necessary parts of the
project are rebuilt automatically. Is there some reason why ASP.Net
projects don't work this way? Some setting I can change so that
changes take effect when I hit F5?

The other way to make the changes take effect right away, is to
declare a new variable like "int x;", even if you never use it. If
you do that, the WebForm will display whatever you've modified
Response.Write() to write, even if you don't do Rebuild Solution
first. I guess this is why I didn't notice this problem until now,
since most of the time, the changes I made would be substantial enough
that the relevant parts would be rebuilt when I wanted to debug.

-Bennett
Nov 17 '05 #1
8 1375
What Version are you running etc..
I tried it and it works, but I did not create a new project
I just added you line below and changed "firsttime" to "secondtime" etc..
and it was giving me the correct output
may be .NET does not consider that a one line program is a serious enough
program and will not work for you... Kidding
"Bennett Haselton" <be*****@peacefire.org> wrote in message
news:e6**************************@posting.google.c om...
If I create a new C# Web Project in Visual Studio and add this to the
Page_Load method for WebForm1:

Response.Write("firsttime");

then hitting F5 to debug the project of course shows the WebForm with
"firsttime" on the page.

But if I then change it to Response.Write("secondtime") and hit F5,
the changes don't take effect -- the WebForm still opens and displays
"firsttime". Even if I do "Build->Build Solution" and then hit F5,
the WebForm still displays "firsttime". It's only if I do
Build->*Rebuild* Solution and then debug, that the changes take effect
and I see "secondtime".

I haven't used Visual Studio much before doing ASP.Net but this seems
inconsistent with the way all other kinds of projects work. In
general, if you modify one of the source files and hit F5, the changes
take effect -- the source is saved and the necessary parts of the
project are rebuilt automatically. Is there some reason why ASP.Net
projects don't work this way? Some setting I can change so that
changes take effect when I hit F5?

The other way to make the changes take effect right away, is to
declare a new variable like "int x;", even if you never use it. If
you do that, the WebForm will display whatever you've modified
Response.Write() to write, even if you don't do Rebuild Solution
first. I guess this is why I didn't notice this problem until now,
since most of the time, the changes I made would be substantial enough
that the relevant parts would be rebuilt when I wanted to debug.

-Bennett

Nov 17 '05 #2
What Version are you running etc..
I tried it and it works, but I did not create a new project
I just added you line below and changed "firsttime" to "secondtime" etc..
and it was giving me the correct output
may be .NET does not consider that a one line program is a serious enough
program and will not work for you... Kidding
"Bennett Haselton" <be*****@peacefire.org> wrote in message
news:e6**************************@posting.google.c om...
If I create a new C# Web Project in Visual Studio and add this to the
Page_Load method for WebForm1:

Response.Write("firsttime");

then hitting F5 to debug the project of course shows the WebForm with
"firsttime" on the page.

But if I then change it to Response.Write("secondtime") and hit F5,
the changes don't take effect -- the WebForm still opens and displays
"firsttime". Even if I do "Build->Build Solution" and then hit F5,
the WebForm still displays "firsttime". It's only if I do
Build->*Rebuild* Solution and then debug, that the changes take effect
and I see "secondtime".

I haven't used Visual Studio much before doing ASP.Net but this seems
inconsistent with the way all other kinds of projects work. In
general, if you modify one of the source files and hit F5, the changes
take effect -- the source is saved and the necessary parts of the
project are rebuilt automatically. Is there some reason why ASP.Net
projects don't work this way? Some setting I can change so that
changes take effect when I hit F5?

The other way to make the changes take effect right away, is to
declare a new variable like "int x;", even if you never use it. If
you do that, the WebForm will display whatever you've modified
Response.Write() to write, even if you don't do Rebuild Solution
first. I guess this is why I didn't notice this problem until now,
since most of the time, the changes I made would be substantial enough
that the relevant parts would be rebuilt when I wanted to debug.

-Bennett

Nov 17 '05 #3
MS News \(MS ILM\) wrote:
What Version are you running etc..
Microsoft Development Environment 2002 v. 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705
Windows XP Home SP1
The ASP.Net Web projects are uploaded to a Windows 2000 Server machine
on the LAN.
I tried it and it works, but I did not create a new project
I just added you line below and changed "firsttime" > to "secondtime"

etc..

Did you do the debug while it still said "firsttime", and *then* change
it to "secondtime" and hit F5 again?

-Bennett

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4
MS News \(MS ILM\) wrote:
What Version are you running etc..
Microsoft Development Environment 2002 v. 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705
Windows XP Home SP1
The ASP.Net Web projects are uploaded to a Windows 2000 Server machine
on the LAN.
I tried it and it works, but I did not create a new project
I just added you line below and changed "firsttime" > to "secondtime"

etc..

Did you do the debug while it still said "firsttime", and *then* change
it to "secondtime" and hit F5 again?

-Bennett

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #5
Well
I hit F5 I see "firsttime"
I exit browser
I change the text to "secondtime"
I hit F5
I see "secondtime"
I am running VS.NET 2003
May be I did not follow your procedure exactly??

"Bennett Haselton" <be*****@peacefire.org> wrote in message
news:ei**************@TK2MSFTNGP09.phx.gbl...
MS News \(MS ILM\) wrote:
What Version are you running etc..


Microsoft Development Environment 2002 v. 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705
Windows XP Home SP1
The ASP.Net Web projects are uploaded to a Windows 2000 Server machine
on the LAN.
I tried it and it works, but I did not create a new project
I just added you line below and changed "firsttime" > to "secondtime"

etc..

Did you do the debug while it still said "firsttime", and *then* change
it to "secondtime" and hit F5 again?

-Bennett

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #6
Well
I hit F5 I see "firsttime"
I exit browser
I change the text to "secondtime"
I hit F5
I see "secondtime"
I am running VS.NET 2003
May be I did not follow your procedure exactly??

"Bennett Haselton" <be*****@peacefire.org> wrote in message
news:ei**************@TK2MSFTNGP09.phx.gbl...
MS News \(MS ILM\) wrote:
What Version are you running etc..


Microsoft Development Environment 2002 v. 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705
Windows XP Home SP1
The ASP.Net Web projects are uploaded to a Windows 2000 Server machine
on the LAN.
I tried it and it works, but I did not create a new project
I just added you line below and changed "firsttime" > to "secondtime"

etc..

Did you do the debug while it still said "firsttime", and *then* change
it to "secondtime" and hit F5 again?

-Bennett

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #7
"Bennett Haselton" <be*****@peacefire.org> wrote in message
news:ei**************@TK2MSFTNGP09.phx.gbl...
MS News \(MS ILM\) wrote:
What Version are you running etc..


Microsoft Development Environment 2002 v. 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705
Windows XP Home SP1
The ASP.Net Web projects are uploaded to a Windows 2000 Server machine
on the LAN.


Maybe this is because you're running the project remotely.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #8
"John Saunders" <jo***********@surfcontrol.com> wrote in message news:<ey**************@tk2msftngp13.phx.gbl>...
"Bennett Haselton" <be*****@peacefire.org> wrote in message
news:ei**************@TK2MSFTNGP09.phx.gbl...
MS News \(MS ILM\) wrote:
What Version are you running etc..


Microsoft Development Environment 2002 v. 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705
Windows XP Home SP1
The ASP.Net Web projects are uploaded to a Windows 2000 Server machine
on the LAN.


Maybe this is because you're running the project remotely.


That looks like it -- I created a new C# Web Project using a copy of
VS.NET installed on the Windows 2000 Server machine itself, repeated
the steps I'd done earlier, and "firsttime" did get changed to
"secondtime" as expected. (Though when I did it again remotely from
my Windows XP Home machine, the update still did not take effect until
I did "Rebuild All".)

But since I want to keep doing the development on my Windows XP
machine, is there a reason that the changes don't take effect when you
do F5-debug if you're running the project remotely -- and why the
changes *do* take effect if you add a declaration of a new variable to
your code?

-Bennett
Nov 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by EdgarBM | last post: by
2 posts views Thread by Keith Smith | last post: by
5 posts views Thread by Nick Gilbert | last post: by
2 posts views Thread by Bob Altman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.