[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 299
  • Last Modified:

Changes in my codebehind do not reflect when previewing my page

When I make a change on my code behind file and I preview my page from server whether in debug mode using visual stuido.net 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)
            Else
                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)
            Else
                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.




0
Padre_Corleone
Asked:
Padre_Corleone
  • 2
1 Solution
 
sforcierCommented:
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"?


0
 
Padre_CorleoneAuthor Commented:
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.

0
 
sforcierCommented:
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.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now