473,508 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why I get error "There was an error rendering..."

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 of it I see "There was error
rendering the control. Object not set to an instance of object".
My control is derived from linkButton and I just needed to add a few
properties but rendering stays the same. For real I just override click
event and set something to Text property. And if I put this control on a
page it works. It doesn't render in designer view of detailsView only :( Can
you help ?
Jarod

Jan 26 '06 #1
1 1857
Without seeing what you're overriding, I can only take a guess.

The designer does load the control so you will go through several of the
normal 'rendering' events (e.g. Load, CreateChildControls, etc.). I'm
guessing you are changing the Text property to a value of an object that you
only have at runtime. You should wrap that call with a If..Then checking the
design mode something like below:

If Me.Site Is Nothing OrElse Not Me.Site.DesignMode Then
'TODO: Set the text to whatever object you're already setting it to
'Me.Text = <whatever it is that you're doing>
End If

HTH,

Matt Dinovo

"Jarod" <bl*****@NOSPAM.gazeta.pl> wrote in message
news:Ot*************@tk2msftngp13.phx.gbl...
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 of it I see "There was error
rendering the control. Object not set to an instance of object".
My control is derived from linkButton and I just needed to add a few
properties but rendering stays the same. For real I just override click
event and set something to Text property. And if I put this control on a
page it works. It doesn't render in designer view of detailsView only :(
Can you help ?
Jarod

Jan 26 '06 #2

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

Similar topics

0
4449
by: Joe Helmick | last post by:
This weird error started showing up as I was developing an email-enabled program. Once it occurs, I cannot set breakpoints in my code. Quitting Visual Studio does not help, nor does restarting my...
3
1214
by: MSUTech | last post by:
Hello, I am working on an asp page.. I would like to find out how many semi-colons exist in a request variable. I thought I could use something like INSTR, but, that just tells me WHERE the...
0
3608
by: Colin | last post by:
"There is no object in this control" in Access 97 form with registered MSINET.OCX on XP machine I have an Access 97 database that I made a form with using the Microsoft Internet Transfer control...
2
10009
by: rollasoc | last post by:
Hi, When I load my application I get the the above first chance exception. Stepping through my code it appears to be on the last line of the these two lines Process current =...
44
4148
by: Tolga | last post by:
As far as I know, Perl is known as "there are many ways to do something" and Python is known as "there is only one way". Could you please explain this? How is this possible and is it *really* a...
0
7224
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
7118
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
7323
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
7379
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...
1
7038
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...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.