0

Hi,

I have a problem here. I have a project running on localhost. Whenever I made some changes on a .aspx file, the changes can be seen immediately when I access my localhost. But when I made changes in aspx.vb file, the localhost still showing old info.

* I have try delete all files and folders in Temporary ASP.NET Files, clear browser cache, restart my IIS admin, restart my World Wide Web Publishing Service.

Any help???

4
Contributors
13
Replies
14
Views
7 Years
Discussion Span
Last Post by raul15791
Featured Replies
  • 1
    __avd 1,826   7 Years Ago

    [b]>Whenever I made some changes on a .aspx file, [icode]the changes can be seen immediately[/icode] when I access my localhost. But [icode]when I made changes in aspx.vb file, the localhost still showing old info.[/icode][/b] Code-behind file has a partial class which inherits [U]System.Web.UI.Page[/U] class. The .aspx file contains an Inherits … Read More

0

Hi there

Whenever you make changes in aspx file the changes will be reflected in browser because the page is designed in html; which is parsed in web browser. however if you make changes in code behind .aspx.vb then you have to builld the appliction, this will compile your code into .dll

So i suggest you , just build the app after changes in code-behind

short cut for build : ctrl + b or from build menu -- > build solution


Mark as solved if it helps you

Edited by reach_yousuf: n/a

0

VS is not responsible to compile your web-pages/code, pages are compiled automatically by asp.net compiler. ASP.NET 2.0 and later version uses aspnet_compiler.exe to compile your web-pages/code-behind along with code placed in app_code.

0

VS is not responsible to compile your web-pages/code, pages are compiled automatically by asp.net compiler. ASP.NET 2.0 and later version uses aspnet_compiler.exe to compile your web-pages/code-behind along with code placed in app_code.

Hi adatapost,
Thanks for you reply. By using the aspnet_compiler.exr to compile website, the result will be just the same when the runtime compiles files for a browser request. Am I right? So, if I clear everything in the "Temporary ASP.NET Files" folder and reopen my website from web browser, it suppose reflect the changes right? But it still remained the same......

0

> if I clear everything in the "Temporary ASP.NET Files" folder and reopen my website from web browser, it suppose reflect the changes right? But it still remained the same......

I guess! They (deleted files) were belongs to other webapplication. Create a new/empty webapplication and copy all files/folders from exising application into this new one. Let's see what happens.

0

Hi there

Whenever you make changes in aspx file the changes will be reflected in browser because the page is designed in html; which is parsed in web browser. however if you make changes in code behind .aspx.vb then you have to builld the appliction, this will compile your code into .dll

So i suggest you , just build the app after changes in code-behind

short cut for build : ctrl + b or from build menu -- > build solution


Mark as solved if it helps you

Hi Yousurf,

Thanks for your reply. I'm having problem installing VS actually.:'( I'll try your method as soon as I manage to install VS. I'll post if I get any result. :)

0

> if I clear everything in the "Temporary ASP.NET Files" folder and reopen my website from web browser, it suppose reflect the changes right? But it still remained the same......

I guess! They (deleted files) were belongs to other webapplication. Create a new/empty webapplication and copy all files/folders from exising application into this new one. Let's see what happens.

Hi adatapost,
I have tried. But the new app I created is just as weird as the old one. The aspx.vb is still not reflecting any changes. I am sure I am editing the correct file. In the XXX.aspx file, I can see the the line :

Codebehind="XXX.aspx.vb"

I even tried removing the .aspx.vb from the folder. Delete all temp files in "Temporary ASP.NET Files" folder, restart IIS. Pre-Compile my project using aspnet_compiler. But it still loading ok.... without the .asp.vb....

1

>Whenever I made some changes on a .aspx file, the changes can be seen immediately when I access my localhost. But when I made changes in aspx.vb file, the localhost still showing old info.

Code-behind file has a partial class which inherits System.Web.UI.Page class. The .aspx file contains an Inherits attribute in the @Page directive that points to the code-behind partial class. When the page is compiled, ASP.NET generates a partial class based on the .aspx file; this class is a partial class of the code-behind class file. The generated partial class file contains declarations for the page's controls. Finally, ASP.NET generates & compiles another class called [B]Pagename_aspx[/B], that inherits from the class generated (Partial) class.

0

>Whenever I made some changes on a .aspx file, the changes can be seen immediately when I access my localhost. But when I made changes in aspx.vb file, the localhost still showing old info.

Code-behind file has a partial class which inherits System.Web.UI.Page class. The .aspx file contains an Inherits attribute in the @Page directive that points to the code-behind partial class. When the page is compiled, ASP.NET generates a partial class based on the .aspx file; this class is a partial class of the code-behind class file. The generated partial class file contains declarations for the page's controls. Finally, ASP.NET generates & compiles another class called [B]Pagename_aspx[/B], that inherits from the class generated (Partial) class.

Hi adatapost,
Great explanation. But is there anyway to solve this problem? May I know why the website can run perfectly even after the XXX.aspx.vb is removed??

0

>May I know why the website can run perfectly even after the XXX.aspx.vb is removed??

ASP.NET compiler compiles App_Code and any code-behind files associated with aspx, ascx, etc files. The runtime caches all the compilation results in order to quickly process later requests, and does not need to recompile again unless someone edits a file.

0

ASP.NET compiler compiles App_Code and any code-behind files associated with aspx, ascx, etc files. The runtime caches all the compilation results in order to quickly process later requests, and does not need to recompile again unless someone edits a file.

Ok. How can I delete the cache? Other than clearing the "Temporary ASP.NET Files" Folder...

0

Hi Rahul,
Your aspx page is rightly attached to your aspx.vb page. Now you need to verify that your events in this vb file are handled. For e.g. your page load method should be something like Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Similarly submit button click event should be handled with code similar to Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click

Probably you are not handling the events and as such your code might not be getting called also. Let me know if it works for you.

0

Thanks to all replies given. I'll try all the methods provided and come back with some feedback. Thanks. :)

0

Hi all,

Sorry for leaving this thread for so long... So what you mean is that whenever I made changes on aspx.vb file, I'll need to recompile the project again?

P.S: My project is super large can takes long long time to compile. Is it possible for me to compile only the part where I make changes?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.