How can i write event handlers for a dynamic created control
-
I have created some controls dynamically at run time On Page Load. for example Text box and drop down list. How can i attach event handlers for them.... Plz tell me ASAp... Thanxx in advance:-D This is naresh
-
I have created some controls dynamically at run time On Page Load. for example Text box and drop down list. How can i attach event handlers for them.... Plz tell me ASAp... Thanxx in advance:-D This is naresh
Control.Attributes.Add("onclick", "Function()") Read up on Attributes Jon G www.Gizmocoder.com
-
I have created some controls dynamically at run time On Page Load. for example Text box and drop down list. How can i attach event handlers for them.... Plz tell me ASAp... Thanxx in advance:-D This is naresh
You could use delegates to handle the eveents triggered by the controls this.MyButton.Click += new System.Web.UI.ButtonClickEventHandler(this.MyButton_Click); This should be able to asssociate the click event raised on the MyButton control to the MyButton_click method zimcoder What Democracy?? Jesus Christ is King and if you do not like... well you can go to hell!