Sep 16, 2011, 6:55 PM
ClientID using ProxyManager and CustomDirectEvents
I am adding a Label control dynamically in codebehind and trying to add a click event to it. When I try #1 it works but #2 has no effect. Without having to construct the ClientID manually please give me a better way to write this code.
#1) DocProxyManager.CustomDirectEvents.Add(New Ext.Net.DirectEvent("centerPlaceHolder_TemplateAut horing_" + lblSectionHeading.ClientID, HtmlEvent.Click, New Ext.Net.ComponentDirectEvent.DirectEventHandler(Ad dressOf UpdateFields)))
#2) DocProxyManager.CustomDirectEvents.Add(New Ext.Net.DirectEvent(lblSectionHeading.ClientID, HtmlEvent.Click, New Ext.Net.ComponentDirectEvent.DirectEventHandler(Ad dressOf UpdateFields)))
#1) DocProxyManager.CustomDirectEvents.Add(New Ext.Net.DirectEvent("centerPlaceHolder_TemplateAut horing_" + lblSectionHeading.ClientID, HtmlEvent.Click, New Ext.Net.ComponentDirectEvent.DirectEventHandler(Ad dressOf UpdateFields)))
#2) DocProxyManager.CustomDirectEvents.Add(New Ext.Net.DirectEvent(lblSectionHeading.ClientID, HtmlEvent.Click, New Ext.Net.ComponentDirectEvent.DirectEventHandler(Ad dressOf UpdateFields)))