Combining attributes with base class
I am creating a custom button control, inheriting from
System.Web.UI.WebControls.Button. I need to add client-side script to the
The problem is that the onclick attribute is generated by the Button base
class if validation is enabled. If I override the AddAttributesToRender
method and call base.AddAttributesToRender(), the base class renders all the
button attributes, including the onclick event with the client side
validation script. If I don't call it, I have to call writer.AddAttribute
for each and every base class attribute.
I tried adding my onclick attribute using this.Attributes.Add("onclick",
"bla();"). This is not good enough because the base class adds my code
before the validation code, and I need it to be reversed.
Re: Combining attributes with base class
to call your onclick implementation.
blog : http://weblogs.asp.net/ngur
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
|All times are GMT. The time now is 12:33 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.