Codebehind problem

F

Francisco Carvalho

I have created a user control that gets loaded by a page.
The user control has a codebehind, but when I change the
code on the codebehind, it never runs.
If on the other hand a run the same code on the .ascx
file it runs with no problems.
The directive(see below) was added automatically by
VS.NET so I can't seam to know what the problem is. Any
thoughts?
Francisco

<%@ Control Language="vb" AutoEventWireup="False"
Codebehind="idx_CSS.ascx.vb" Inherits="nova.idx_CSS"
TargetSchema="http://schemas.microsoft.com/intellisense/ie
5" %>
 
R

Ryan Gregg

Francisco,
You need to rebuild the project in VS.NET. Using the VS.NET code behind
model pre-compiles all of the code behind files into a single assembly,
located in your /bin folder. If you change the code in the code-behind
file, ASP.NET still uses the compiled assembly, so until you rebuild the
project (and thus compile the assembly), nothing is changed. On the other
hand, the ascx file is always parsed from the actual file, so changes there
are reflected immediately.

Ryan
 
F

Francisco Carvalho

Hi Ryan,

Thanks for the reply. I did rebuil the solution, but with
no success. I then deleted the dll from within the VS.NET
enviroment and build the project. That recreated the dll,
which fixed the probelm. Thanks a lot.

Francisco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top