Changes in my codebehind do not reflect when previewing my page

Posted on 2006-05-17
Last Modified: 2010-08-05
When I make a change on my code behind file and I preview my page from server whether in debug mode using visual 2003 or IIS manager, changes do not take place.

OK for example  I had something like this before
******* partial code*********
If dr.Read() Then
            If dr("Pwd").ToString = txtUserPass.Text Then
                FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, False)
                lblMsg.Text = "Invalid User Name"

****** Minor change in my code to this (label) ********************
If dr.Read() Then
            If dr("Pwd").ToString = txtUserPass.Text Then
                FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, False)
                lblMsg.Text = "Invalid User Name and/or Password"

when I view my page I can not see the change on my text label.
I have tried different things

1.  Erase my cookies, temp files in temp folder
2. restart IIS
3. stop and start website
and nothing
I will really appreciate if someone can help me solve this problem.

Question by:Padre_Corleone
    LVL 6

    Expert Comment

    Let's start with the basics:

    Did you recompile your code/update the assemblies in the bin folder after you made the changes?
    Have you tried right clicking the page and choosing "Refresh"?

    LVL 7

    Author Comment

    what i did was, I rebuilded my solution, and rebuilded my application by going to Build > Rebuild.
    If that is what i understood, if not how can i recomile?
    yes I have tried right click on page and choosing refresh.

    LVL 6

    Accepted Solution

    Rebuilding is the same as recompiling, so yeah that's what I was talking about.

    Changes to the codebehind for a web project only change the assembly file. If you don't know what an assembly is, do a search for *.dll on your web root and you'll see a file somewhere named YourProject.dll, that's the assembly file, it's where all the compiled stuff goes.

    If you're copying files to a web server, make sure you update this file as well as your .aspx files. This file belongs in the "bin" folder on the web server (it may be in the \bin\Debug\ folder on your machine).

    If you're working locally, try deleting the dll (you may want to make a copy if you've not played around with this sort of thing before) then rebuild your project. The dll should be recreated when you rebuild.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now