473,386 Members | 2,042 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,386 software developers and data experts.

Problem with .NET 2.0 Website Control

I have a custom radio button class (MyRadioButtonList) inherited from
System.Web.UI.Controls.RadioButtonList. The control is contained in a
standard class file - not a user control. When I try to use it in a web form
..aspx using the following code, I receive "directive is missing a 'src'
attribute" and "Unknown server tag 'MY:MyRadioButtonList' errors. This
worked in 1.1, but does not work in 2.0 - or possibly just in VS2005. What
am I doing wrong?

<%@ Register TagPrefix="MY" TagName="MyRadioButtonList" %>

<MY:MyRadioButtonList ID="myID" Runat="server">

</MY:MyRadioButtonList>
Aug 31 '06 #1
3 2921
I found the answer:

<compilation debug="true" batch="false">

needs to be placed in the web.config
"Jibber" <no****@jibberjabberish.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I have a custom radio button class (MyRadioButtonList) inherited from
System.Web.UI.Controls.RadioButtonList. The control is contained in a
standard class file - not a user control. When I try to use it in a web
form .aspx using the following code, I receive "directive is missing a
'src' attribute" and "Unknown server tag 'MY:MyRadioButtonList' errors.
This worked in 1.1, but does not work in 2.0 - or possibly just in VS2005.
What am I doing wrong?

<%@ Register TagPrefix="MY" TagName="MyRadioButtonList" %>

<MY:MyRadioButtonList ID="myID" Runat="server">

</MY:MyRadioButtonList>


Aug 31 '06 #2
OK, I thought this worked, but still getting the error. Any ideas? BTW: The
..cs file is located in the App_Code folder of the Web Site.

"Jibber" <no****@jibberjabberish.comwrote in message
news:eL**************@TK2MSFTNGP05.phx.gbl...
>I found the answer:

<compilation debug="true" batch="false">

needs to be placed in the web.config
"Jibber" <no****@jibberjabberish.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>I have a custom radio button class (MyRadioButtonList) inherited from
System.Web.UI.Controls.RadioButtonList. The control is contained in a
standard class file - not a user control. When I try to use it in a web
form .aspx using the following code, I receive "directive is missing a
'src' attribute" and "Unknown server tag 'MY:MyRadioButtonList' errors.
This worked in 1.1, but does not work in 2.0 - or possibly just in VS2005.
What am I doing wrong?

<%@ Register TagPrefix="MY" TagName="MyRadioButtonList" %>

<MY:MyRadioButtonList ID="myID" Runat="server">

</MY:MyRadioButtonList>



Aug 31 '06 #3

<cut and paste from reply to other post>

Jibber,

You could probably get it to work in a single solution but if you....

1) Split the control into a class library
2) Add the Class library solution to your project
3) Add a Project reference to the Class Library to you web solution
4) Add your @Register line as: <%@ Register Assembly="<ASSEMBLY_NAME"
Namespace="<CONTROL_NAMESPACE>" TagPrefix="MY" %>

Should work. Worked for me and it allows for easier reuse of the control in
other web projects!

Michael

"Jibber" wrote:
OK, I thought this worked, but still getting the error. Any ideas? BTW: The
..cs file is located in the App_Code folder of the Web Site.

"Jibber" <no****@jibberjabberish.comwrote in message
news:eL**************@TK2MSFTNGP05.phx.gbl...
I found the answer:

<compilation debug="true" batch="false">

needs to be placed in the web.config
"Jibber" <no****@jibberjabberish.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I have a custom radio button class (MyRadioButtonList) inherited from
System.Web.UI.Controls.RadioButtonList. The control is contained in a
standard class file - not a user control. When I try to use it in a web
form .aspx using the following code, I receive "directive is missing a
'src' attribute" and "Unknown server tag 'MY:MyRadioButtonList' errors.
This worked in 1.1, but does not work in 2.0 - or possibly just in VS2005.
What am I doing wrong?

<%@ Register TagPrefix="MY" TagName="MyRadioButtonList" %>

<MY:MyRadioButtonList ID="myID" Runat="server">

</MY:MyRadioButtonList>



Sep 1 '06 #4

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

Similar topics

15
by: Steve Horrillo | last post by:
I can't figure out why this script won't insert the subject in the email and why can't I control the font and size being used? I'm not sure where to post this. Let me know where if this is OT. ...
0
by: compuglobalhypermeganetz0r | last post by:
I am having trouble getting an adapter to update my access database, it gives the error Syntax error in INSERT INTO statement. for Line 98: Adapter.Update(WineDS, "tblWines") Below is my...
3
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about...
2
by: Lloyd Dupont | last post by:
I'm trying to play with ASP.NET and I have some problem understanding how to solve some problem, I wonder if I get it all wrong... As an exercise for my firsts ASP.NET work I decided to write a...
1
by: Fabrice | last post by:
Hello, I have encountered a deep problem with accent and I don't understand why. I m preparing a multi-language website. French and English so far. With french, we have accents and ......
0
by: Fabrice | last post by:
Hello, (Alain) Tis is a part of my code to retrieve text from hastable in memory cache, by reading (befor) a resources file. Thanks for your help. /1/ The resources file * I have create a...
2
by: mkd1919 | last post by:
I'm developing a web service that will eventually be sent to other like organizations to communicate for a particular application. After a few weeks, I decided it would be better to split of the...
13
by: Kobee | last post by:
Hi, I'm having a few issues adapting to new 2.0 "website" project vs. the old 1.1 "web application". One of the major issues I'm having is with the notion of namespaces. Using the old way, I...
0
by: deacon57 | last post by:
FYI - If you are a computer scientist (or geek), this post may be for you. I wanted to log any search keywords, etc that are used on my site. I created a simple program that logs search terms...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi, I wonder if someone could shed some light on this one for me. I have developed a web app in VS2005 with the built in server. It uses an sql database, everytihng works. I need to test it...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.