getting custom property from java-script

getting custom property from java-script

Old forum URL: forums.lhotka.net/forums/t/2950.aspx


david.wendelken posted on Monday, May 28, 2007

I'm making a sub-class of TextBox that is Csla-smart.  To that end, I've added some additional properties to the subclass.  Part of the sub-class is a built-in custom validator with a java-script component.  In fact, it's a sub-class of the custom validator with an extra property.

Now I'm in the process of adding in the javascript that the custom validator sub-class will call.

I need to be able to access the new property of the custom validator subclass from within javascript or modify how it calls its code (to include a new argument).

But I'm very new to javascript and custom webcontrols.

Any ideas? 

david.wendelken replied on Tuesday, May 29, 2007

Found out how to do it. :)

In the control's Render method, before base.Render(w), do a w.AddAttribute("myAttrName","myAttrValue);

 

 

Copyright (c) Marimer LLC