Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
WebHostForAsp.net
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  CodeFile and CodeBehind difference
Previous Previous
 
Next Next
New Post 4/19/2008 9:22 AM
Informative
User is offline Thomas
11 posts
10th Ranked


CodeFile and CodeBehind difference 

Could someone please tell me the difference between CodeFile= and CodeBehind= in an .ascx file? VB puts a CodeFile in by default and I noticed that some of the controls in the core, like admin/skins/Login.ascx use it. However, when I try to use it in my ascx skin file I get an error message:

Could Not Load Skin: /Portals/_default//skins/test_skin1/skinwebusercontrol.ascx Error: The file '/DotNetNuke/admin/Skins/skin.vb' does not exist.

When I change my CodeFile= to CodeBehind= everything works just fine.

What's the difference? Thx.

 
New Post 4/19/2008 12:38 PM
User is offline FMeyer
15 posts
10th Ranked


Re: CodeFile and CodeBehind difference 

The "CodeBehind" is a legacy attribute from ASP 1.1. "CodeFile" replaced it in ASP 2.0.

This is probably your culprit code: <%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>

While I don't know the exact reason, I suspect it has to do with the way the "skin.vb" module is coded. "CodeFile" should point to a module that resolves the "DotNetNuke.UI.Skins.Skin" partial class.  The "skin.vb" module is probably not coded in a ASP 2.0 way that resolves that class.

That's not really an answer, but I hope it helps.

 

 
New Post 4/19/2008 7:22 PM
User is offline Thomas
11 posts
10th Ranked


Re: CodeFile and CodeBehind difference 

Thanks for that historical reference clarification. I've been stuck in a major Classic ASP project for years and am now jumping into ASP.NET deeply for the first time. Yes, the line that causes the error is:

<%

@ Control Language="VB" AutoEventWireup="false" CodeFile="~/admin/Skins/skin.vb" Inherits="DotNetNuke.UI.Skins.Skin" %>

So, I gather from what you say that if they recoded skin.vb for ASP 2.0 this problem would go away. In the Install package, there is no actual module in admin/Skins called skin.vb; it exists only in the source package and is the only .vb module there that is not an .ascx.vb file. I had a quick look at the source for skin.vb but don't yet know enough about the differences between ASP 1.1 and ASP 2.0 coding to see evidence of what you are talking about. However, it does sound plausible.

If that is the problem, is that not a bug? Should we report it?

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  CodeFile and CodeBehind difference
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNNhost Scandinavia
SUPER fast QuadCore DELL servers, MSSQL servers, DotNetPanel, daily backup, Check out our customers websites
DNNhost.dk
Personify Design, Inc.
Seattle-based Personify Design has developed customized DotNetNuke websites for a wide range of customers to meet many different types of needs, including distributed authorship across thousands of pages to integrated Verisign e-commerce capabilities.
www.personifydesign.com
DNN Outsourcing
50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
www.dnnoutsourcing.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP