Professional Web Applications Themes

aspx page changes not picked up by debugger unless do "Rebuild Solution" - ASP.NET General

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

  1. #1

    Default 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
    Bennett Guest

  2. #2

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

    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" <org> wrote in message
    news:google.com... 


    MS Guest

  3. #3

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

    MS News \(MS ILM\) wrote:
     

    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.
     
    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!
    Bennett Guest

  4. #4

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

    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" <org> wrote in message
    news:phx.gbl... 
    >
    > 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.

    > 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![/ref]


    MS Guest

  5. #5

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

    "Bennett Haselton" <org> wrote in message
    news:phx.gbl... 
    >
    > 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.[/ref]

    Maybe this is because you're running the project remotely.
    --
    John Saunders
    Internet Engineer
    com


    John Guest

  6. #6

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

    "John Saunders" <com> wrote in message news:<phx.gbl>... 
    > >
    > > 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.[/ref]
    >
    > Maybe this is because you're running the project remotely.[/ref]

    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
    Bennett Guest

Similar Threads

  1. "Page" and "Rect" props of the Field prop in Javascript API
    By ArtIn_Act@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 8
    Last Post: March 19th, 05:35 PM
  2. Replies: 2
    Last Post: August 3rd, 02:08 PM
  3. Can't choose "page setup" or "print" - Mac OS 9x
    By chris.. webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 0
    Last Post: November 19th, 12:20 PM
  4. Replies: 2
    Last Post: September 15th, 02:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139