|
|
 |
| 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |
|

December 3rd, 2003, 12:08 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Location: London, London, United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
'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...
|

December 3rd, 2003, 05:44 PM
|
|
Authorized User
|
|
Join Date: Oct 2003
Location: , , Norway.
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

December 4th, 2003, 05:31 AM
|
|
Registered User
|
|
Join Date: Dec 2003
Location: London, London, United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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....
|

December 4th, 2003, 08:07 AM
|
|
Registered User
|
|
Join Date: Dec 2003
Location: London, London, United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

May 27th, 2004, 08:09 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

December 21st, 2005, 02:20 PM
|
|
Authorized User
|
|
Join Date: Jun 2005
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

June 12th, 2007, 05:24 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

September 29th, 2007, 05:47 AM
|
|
Registered User
|
|
Join Date: Jun 2004
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

December 4th, 2007, 10:56 PM
|
|
Registered User
|
|
Join Date: Dec 2007
Location: Bear, DE, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

May 20th, 2008, 03:12 AM
|
|
Registered User
|
|
Join Date: May 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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)
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |