views:

12

answers:

2

Hi,

I added dynamicly infragistics webpanel in my codebehind using : placeHolder.Controls.Add(ctlWebpanel); but i got this javascript error in my ASP.net page in runtime : 'currentStyle' is null or not an object

How to set the style to remove that error ?

A: 

Hey,

Well it depends. currentStyle is a variable or property that's being called, but there is no underlying reference. It could be with adding it dynamically (at what point do you do this), but probably not.

Do you see a $create javascript statement for the control in the source? What line do you get this error, and what is going on in the page?

Can you give any more details?

Brian
A: 

Thanks Brian for your concern. I find out that what was missing is css style class. I just setted the property cssClass dynamicly when creating my control and it works ! But what I still don't understand is why It's mandatory to set it dynamicly when you don't have to if you added it directly in design.

reenn