473,394 Members | 1,946 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,394 software developers and data experts.

Error rendering control

I have created a custom composite control, which is a date picker. It works
fine but in the design view I get am "Error creating control" 'caltext'
could not be set on property 'btnCssClass' (caltext is the string I am
assigning for the cssclass of a button on the control). I don't need it to
display anything in design view, a blank grey box would be fine. It's just
this error sometimes stop the whole page from rendering in design view.

What I am doing wrong. I didn't want to put the whole code up as it is long
winded. Regards, Chris.

Public Property btnCssClass() As String

Get

EnsureChildControls()

Return btnDate.CssClass

End Get

Set(ByVal value As String)

EnsureChildControls()

btnDate.CssClass = value

End Set

End Property
Jun 27 '07 #1
2 5183
Chris,

Try to put call to EnsureChildControls conditionally:

If Not Me..DesignMode Then EnsureChildControls()
"Chris" wrote:
I have created a custom composite control, which is a date picker. It works
fine but in the design view I get am "Error creating control" 'caltext'
could not be set on property 'btnCssClass' (caltext is the string I am
assigning for the cssclass of a button on the control). I don't need it to
display anything in design view, a blank grey box would be fine. It's just
this error sometimes stop the whole page from rendering in design view.

What I am doing wrong. I didn't want to put the whole code up as it is long
winded. Regards, Chris.

Public Property btnCssClass() As String

Get

EnsureChildControls()

Return btnDate.CssClass

End Get

Set(ByVal value As String)

EnsureChildControls()

btnDate.CssClass = value

End Set

End Property
Jun 28 '07 #2
That did the trick. Thanks.

"Sergey Poberezovskiy" <Se*****************@discussions.microsoft.comwrot e
in message news:DF**********************************@microsof t.com...
Chris,

Try to put call to EnsureChildControls conditionally:

If Not Me..DesignMode Then EnsureChildControls()
"Chris" wrote:
>I have created a custom composite control, which is a date picker. It
works
fine but in the design view I get am "Error creating control" 'caltext'
could not be set on property 'btnCssClass' (caltext is the string I am
assigning for the cssclass of a button on the control). I don't need it
to
display anything in design view, a blank grey box would be fine. It's
just
this error sometimes stop the whole page from rendering in design view.

What I am doing wrong. I didn't want to put the whole code up as it is
long
winded. Regards, Chris.

Public Property btnCssClass() As String

Get

EnsureChildControls()

Return btnDate.CssClass

End Get

Set(ByVal value As String)

EnsureChildControls()

btnDate.CssClass = value

End Set

End Property

Jun 28 '07 #3

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

Similar topics

3
by: David Whitney | last post by:
All: I have a control that renders a table. As the table is rendered, each row in the table is constructed by creating a run-time (dynamic) object that is derived from an HtmlTableRow. The row...
0
by: Sanjay Pais | last post by:
I have created a custom control that inherits from the textbox control and adds a property to it. When I drop it on a page it renders just fine. However, When I drop it into a web user...
5
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
7
by: ddd | last post by:
Hi, I am having problems with using the DrawToDC of the MSHTML.iHTMLElementRender in a VB.net application. For some reason I am getting a "catastrophic error". I am basing the code on c#...
1
by: Jarod | last post by:
Hey When I put my control into DetailsView in a template I see it and it seems as working ok. After compile it works on the page. But in normal view in designer I don't see my detailsView instead...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
4
by: AG | last post by:
Using VS2005. When I add a server control to a page in design view, it displays the following; Error Rendering Control = <control name> An unhandled exception has occurred. 'HelpVerb' could...
2
by: Benton | last post by:
Hi there, I'm creating a custom server control, inheriting from TextBox. It has this AsDateTime property that returns the textbox contents converted to the nullable DateTime data type, as...
0
by: josh | last post by:
Hi, I've created a custom control that inherits form BaseValidator. It is in a class named: MaxChars. All the code run well but when I switch in Visual Studio from source in design view I...
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
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.