473,385 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Codebehind problem

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" %>

Nov 17 '05 #1
2 2467
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
"Francisco Carvalho" <fc*******@carf.org> wrote in message
news:04****************************@phx.gbl...
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" %>

Nov 17 '05 #2
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
-----Original Message-----
Francisco,
You need to rebuild the project in VS.NET. Using the VS.NET code behindmodel 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-behindfile, ASP.NET still uses the compiled assembly, so until you rebuild theproject (and thus compile the assembly), nothing is changed. On the otherhand, the ascx file is always parsed from the actual file, so changes thereare reflected immediately.

Ryan
"Francisco Carvalho" <fc*******@carf.org> wrote in messagenews:04****************************@phx.gbl...
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" %>

.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
12
by: A.M | last post by:
Hi, Using VS.NET 2003, If i use SRC page attribute instead of CodeBehind, do i still have intelisence and generally IDE support for that? Thanks, Ali
3
by: nevets2001uk | last post by:
Hi. I've just started my second ASP.NET (VB) app and I'm using codebehind this time. I'm not using visual studio but am instead coding it all in notepad (HTML, ASP.NET and CSS) I'm trying to...
3
by: jm | last post by:
I have a question about codebehind. I have an upload namespace, class and all in a codebehind. I currently have it so it works with one of my .aspx pages. I want to use it for another .aspx...
4
by: Mat | last post by:
Hi, I am having a bit of a problem trying to access / set properties of a usercontrol from the parent codebehind. This is what I have so far.. simple.aspx <%@ Page...
10
by: Arsalan | last post by:
Where is Codebehind usually uploaded? Suppose I have aspx pages containing codebehind in different directories for e.g myweb/aaa myweb/bbb Where do i store the compiled codebehind?
0
by: N. Demos | last post by:
Hello, I have a custom usercontrol, of which I have two instances of in my aspx page. Both the usercontrol and page have codebehind. In the page codebehind, I want a member variable for each...
1
by: Randall Parker | last post by:
Using VS 2003 and Cassini web server. I'm new to ASP.Net and so this may be a dumb question. I'm getting an error where the type 'FarmLand.WebForm1' is not found. The Codebehind C# source file...
1
by: Antoine | last post by:
I have a pretty quickish question about ASPX with codebehind. I have done an exhaustive search of the web so no go there. I was hoping to reach out for some help here. Anyway, I have a really...
11
by: Ranginald | last post by:
This question is about how to handle an .aspx page that references multiple methods and where to store these methods (e.g. one codefile or multiple codefiles). PREFACE ======== I have a simple...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.