473,386 Members | 1,706 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.

I really need to get this working......

The problem:

I create a very simple custom control:

public class cLabel : System.Web.UI.WebControls.Label { }

I place the cLabel in a user control.

When I place the user control on a page I get this exception:

Error Rendering Control - cLabel

An unhandled exception has occurred.

Unknown server tag 'cc1:cLabel'.

So I tried to make a custom control which inherits from webcontrol:

I create a very simple custom control:

Designer(typeof(ControlDesigners))

public class cELabel : WebControl { }

And make a very simple designer for it.

public class ControlDesigners : System.Web.UI.Design.ControlDesigner

{

public override string GetDesignTimeHtml()

{ StringWriter sw = new StringWriter();

HtmlTextWriter tw = new HtmlTextWriter(sw);

cLabel lbl = new cLabel();

lbl.Text = "cLabel";

lbl.RenderControl(sw);

return sw.ToString();

}

}

Now everything works fine within the user control.

But when I place the cELabel into a panel in the user control I get the same
damn error.

I really need to get this working!

Anyone know the 'bug'?

Is there a solution?

I am working with VS2005 (beta), can someone confirm this works in the final
release?

Tia!
Jan 4 '06 #1
4 3421
How is the control being registered?

I'm able to successfully register controls using both global registration
(new in 2.0, via web.config) and the 1.1 approach using @% Register

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Pipo" <Pi**@home.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The problem:

I create a very simple custom control:

public class cLabel : System.Web.UI.WebControls.Label { }

I place the cLabel in a user control.

When I place the user control on a page I get this exception:

Error Rendering Control - cLabel

An unhandled exception has occurred.

Unknown server tag 'cc1:cLabel'.

So I tried to make a custom control which inherits from webcontrol:

I create a very simple custom control:

Designer(typeof(ControlDesigners))

public class cELabel : WebControl { }

And make a very simple designer for it.

public class ControlDesigners : System.Web.UI.Design.ControlDesigner

{

public override string GetDesignTimeHtml()

{ StringWriter sw = new StringWriter();

HtmlTextWriter tw = new HtmlTextWriter(sw);

cLabel lbl = new cLabel();

lbl.Text = "cLabel";

lbl.RenderControl(sw);

return sw.ToString();

}

}

Now everything works fine within the user control.

But when I place the cELabel into a panel in the user control I get the
same damn error.

I really need to get this working!

Anyone know the 'bug'?

Is there a solution?

I am working with VS2005 (beta), can someone confirm this works in the
final release?

Tia!

Jan 4 '06 #2
It is not a registration problem.
Did you test this behaviour and did it work?
Do you use VS2005 final release and can you conform this is working ??

again, it is not the registration, I can register it also on both ways.
If registration fails you'll get an different exception.

Please look again and see if you'll get the same problem.
Which version of VS do you use??

thnx

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
schreef in bericht news:uy**************@TK2MSFTNGP11.phx.gbl...
How is the control being registered?

I'm able to successfully register controls using both global registration
(new in 2.0, via web.config) and the 1.1 approach using @% Register

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Pipo" <Pi**@home.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The problem:

I create a very simple custom control:

public class cLabel : System.Web.UI.WebControls.Label { }

I place the cLabel in a user control.

When I place the user control on a page I get this exception:

Error Rendering Control - cLabel

An unhandled exception has occurred.

Unknown server tag 'cc1:cLabel'.

So I tried to make a custom control which inherits from webcontrol:

I create a very simple custom control:

Designer(typeof(ControlDesigners))

public class cELabel : WebControl { }

And make a very simple designer for it.

public class ControlDesigners :
System.Web.UI.Design.ControlDesigner

{

public override string GetDesignTimeHtml()

{ StringWriter sw = new StringWriter();

HtmlTextWriter tw = new HtmlTextWriter(sw);

cLabel lbl = new cLabel();

lbl.Text = "cLabel";

lbl.RenderControl(sw);

return sw.ToString();

}

}

Now everything works fine within the user control.

But when I place the cELabel into a panel in the user control I get the
same damn error.

I really need to get this working!

Anyone know the 'bug'?

Is there a solution?

I am working with VS2005 (beta), can someone confirm this works in the
final release?

Tia!


Jan 4 '06 #3
I didn't try your designer example, I stuck with the basic Label example.
At home I have VS.NET Pro (rtm). At work I just tried on Visual Web
Developer (rtm) and everything works.

Here's what I have:

cLabel.cs placed in App_Code
namespace Test
{
public class cLabel : Label
{
}
}
ascx:
<%@ Register TagPrefix="Test" Namespace="Test" %>
<Test:cLabel ID="x" runat="Server">test</Test:cLabel>

aspx:
<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl"
TagPrefix="uc1" %>
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
Everything works fine at design time and runs perfect on the browser.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Pipo" <Pi**@home.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The problem:

I create a very simple custom control:

public class cLabel : System.Web.UI.WebControls.Label { }

I place the cLabel in a user control.

When I place the user control on a page I get this exception:

Error Rendering Control - cLabel

An unhandled exception has occurred.

Unknown server tag 'cc1:cLabel'.

So I tried to make a custom control which inherits from webcontrol:

I create a very simple custom control:

Designer(typeof(ControlDesigners))

public class cELabel : WebControl { }

And make a very simple designer for it.

public class ControlDesigners : System.Web.UI.Design.ControlDesigner

{

public override string GetDesignTimeHtml()

{ StringWriter sw = new StringWriter();

HtmlTextWriter tw = new HtmlTextWriter(sw);

cLabel lbl = new cLabel();

lbl.Text = "cLabel";

lbl.RenderControl(sw);

return sw.ToString();

}

}

Now everything works fine within the user control.

But when I place the cELabel into a panel in the user control I get the
same damn error.

I really need to get this working!

Anyone know the 'bug'?

Is there a solution?

I am working with VS2005 (beta), can someone confirm this works in the
final release?

Tia!

Jan 4 '06 #4
thnx, Karl.
I think that it is a VS2005 beta bug, then.
tommorow I'll install the final!!!

thnx again for your patience and your time.

Greets,

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
schreef in bericht news:%2***************@tk2msftngp13.phx.gbl...
I didn't try your designer example, I stuck with the basic Label example.
At home I have VS.NET Pro (rtm). At work I just tried on Visual Web
Developer (rtm) and everything works.

Here's what I have:

cLabel.cs placed in App_Code
namespace Test
{
public class cLabel : Label
{
}
}
ascx:
<%@ Register TagPrefix="Test" Namespace="Test" %>
<Test:cLabel ID="x" runat="Server">test</Test:cLabel>

aspx:
<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl"
TagPrefix="uc1" %>
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
Everything works fine at design time and runs perfect on the browser.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Pipo" <Pi**@home.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
The problem:

I create a very simple custom control:

public class cLabel : System.Web.UI.WebControls.Label { }

I place the cLabel in a user control.

When I place the user control on a page I get this exception:

Error Rendering Control - cLabel

An unhandled exception has occurred.

Unknown server tag 'cc1:cLabel'.

So I tried to make a custom control which inherits from webcontrol:

I create a very simple custom control:

Designer(typeof(ControlDesigners))

public class cELabel : WebControl { }

And make a very simple designer for it.

public class ControlDesigners :
System.Web.UI.Design.ControlDesigner

{

public override string GetDesignTimeHtml()

{ StringWriter sw = new StringWriter();

HtmlTextWriter tw = new HtmlTextWriter(sw);

cLabel lbl = new cLabel();

lbl.Text = "cLabel";

lbl.RenderControl(sw);

return sw.ToString();

}

}

Now everything works fine within the user control.

But when I place the cELabel into a panel in the user control I get the
same damn error.

I really need to get this working!

Anyone know the 'bug'?

Is there a solution?

I am working with VS2005 (beta), can someone confirm this works in the
final release?

Tia!


Jan 4 '06 #5

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

Similar topics

11
by: Tery Griffin | last post by:
who can't get onload to fire at all in IE on a Mac? Iım about to try the suggestion of adding the script after the body tag. Iıd really rather do it some ³right² way, if thereıs a right way that...
1
by: Paul Mendez | last post by:
I really need your assistance. I tried what you gave me and it did not work and I am thinking that the formatting that showed up when u saw my posting might have confused you. So I made sure to...
7
by: farseer | last post by:
Here is the scenario: I have an interface which defines get methods for data that will make up a row in a table. However, the source of this data may, over time, switch/change (The company may...
3
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects...
22
by: Gianni Rondinini | last post by:
hi all. please excuse the misusage of some tech terms, but writing in english is not as easy as in italian :) i'm designing our new website and, since i want to do something that will last as...
131
by: pemo | last post by:
Is C really portable? And, apologies, but this is possibly a little OT? In c.l.c we often see 'not portable' comments, but I wonder just how portable C apps really are. I don't write...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
14
by: dba_222 | last post by:
Dear experts, Again, sorry to bother you again with such a seemingly dumb question, but I'm having some really mysterious results here. ie. Create procedure the_test As
22
by: SQACSharp | last post by:
I'm trying to get the control name of an editbox in another window. The following code set the value "MyPassword" in the password EditBox but it fail to return the control name of the EditBox. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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: 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.