Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 3rd, 2003, 12:08 PM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 'CreateResourceBasedLiteralControl' is not a membe

When I try to compile my application I get the following messages..! In a nunbver of places...and I havn't got a clue how to fix it or what it means..has anybody else had this message..?

'CreateResourceBasedLiteralControl' is not a member of 'ASP.SiteHeader_ascx'

I am using VS.Net 2003...

I can supply more details if anybody is willing to give me some assistance...! I t would be much appreciated...I have had 6 years of ASP experience but am just now crossing over to .NET...

 
Old December 3rd, 2003, 05:44 PM
Authorized User
 
Join Date: Oct 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you just renamed a .ASP page to .ASPX?
or
Have you created an .ASPX file and then copied in .ASP code to it?

------------------------
All help is Good help!
Regards
Michael
 
Old December 4th, 2003, 05:31 AM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Michael...

Thanks for your reply..

No I havn't copied ASP code or renamed the file..

Here is the code for the page:

<%@ Control Language="vb" AutoEventWireup="false" Codebehind="SiteHeader.ascx.vb" Inherits="COLT.ThePhile.Web.Controls.User.SiteHead er" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<link href="/msowa/thephile/Styles/ThePhile.css" rel="stylesheet">

<table width="100%" border="0" class="Site_Header">
    <tr>
        <td width="50%">
            <a href="/msowa/thephile/default.aspx">
                <img src="/msowa/ThePhile/images/ThePhile.gif" border=0 alt="ThePhile.COM">
            </a>
        </td>
    </tr>
</table>


and the code behind is: (I removed the auto generated region for clarity)

Namespace ThePhile.Web.Controls.User

 Public Class SiteHeader

    Inherits System.Web.UI.UserControl



    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
                        System.EventArgs) Handles MyBase.Load
            'Put user code to initialize the page here
    End Sub

    End Class

End Namespace


The control is used like the following...

<%@ Register TagPrefix="COLTUserControl" TagName="SiteHeader" Src="Controls/User/Siteheader.ascx" %>


with a <COLTUserControl:SiteHeader id="Header" runat="Server" /> further into the page....

and that is on a normal web page default.aspx

This is all from the Wrox book I am working through...One thing that I did do was rename my namespace root....would this cause the error..? I started of using the Wrox namespace name but changed it to my company name....

I am actually thinking about starting from scratch....


 
Old December 4th, 2003, 08:07 AM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey I've managed to find the solution...

When I checked the error detail and the full compile script, I noticed that the first error was giving me an error regarding my control, saying it couldn't load it because the name was ambiguous.

After much searching for a solution I stumbled accross it myself.

The controls, when the project is built, are compiled into a dll that sits in the bin (Default) directory of the website (in Inetpub) That is, i suppose if you are makign a web app, like I am. Anyway during the course of development I decided to change my namespace names. Therefore in this directory there was an old dll, and this had an older verison of the siteheader control I am trying to use, and therefore is giving the ambiguous error. I deleted this dll and re built my app and it worked...

Although now I have other troubles! Such is life...

Cheers

Mike

 
Old May 27th, 2004, 07:09 PM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey i found the same problem,

what my problem was i was using a mixture of compiled dlls, and uncompiled vb files, and i had called my new class the same as one of the classes / subs in the other compiled dlls.



 
Old December 21st, 2005, 02:20 PM
Authorized User
 
Join Date: Jun 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Same thing happened to me when i renamed my namespace, delete all the old dll's out of the bin folder recompiled and it started to work.

 
Old June 12th, 2007, 04:24 PM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was getting a similar error but the reason was quite different. Initially I took some old code and was modifying it. I was getting error because I removed 'Public' from the class. So in details it said it was not able to access the class.
Also regarding rebuilding, its not required to delete the old .dll, just use 'Rebuild Project/Solution' option and it will be sufficient.

I was able to compile and successfully load my project because of you all who posted before. Thank you very much.


 
Old September 29th, 2007, 04:47 AM
Registered User
 
Join Date: Jun 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I ran into this same problem. I'm using VS 2005. I was accidentally trying to upload my files out of my 'Visual Studio 2005/Websites/[WebsiteNameHere]' folder. You are supposed be uploading the files from your 'Visual Studio 2005/Projects/[WebsiteNameHere]/Precompiled/[WebsiteNameHere]' folder.

 
Old December 4th, 2007, 10:56 PM
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to educatedcg
Default

Make sure there are no classes or master pages that are duplicated in your project. The application may come but it won't fully work.

 
Old May 20th, 2008, 02:12 AM
Registered User
 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi, about 'CreateResourceBasedLiteralControl' is not a member of 'ASP.SiteHeader_ascx', i found, one cause of this problem come from class visibility (relate to "access right" to this object at runtime). The error is disappear when i change visibilty from "Private" to "Public" in control class (*.ascx.vb)











Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.