Now this would seem to have a straightforward answer for a built in ASP web control...but the Telerik controls gave me some real headache - I tried the following
As you can see I have a Toolbar called MSAToolbar, which in fact contains all kind of web controls. Built in ASP web controls give an expected ClientID (in a mangled format, ie: "RadToolbarTemplateButton1_ctl00_ddMerchant"), but the ToggleButton.ClientID is the same as the ID on the .aspx markup page, thus cannot reference it properly from javascript. I need it in javascript as I want to set the Toggled property to true/false from client side. I don't want to use the <%=RadToolbarToggleButton.ClientID%> version for a couple of reasons.
is there any way I can accomplish the above written task (getting the ClientID and changing the Toggled property)
| string szClientID; |
| //first attempt doesn't work |
| szClientID = RadToolbarToggleButton2.ClientID; |
| //neither this |
| RadToolbarToggleButton tbBut = (RadToolbarToggleButton)MSAToolbar.Items.ToggleButtons[1]; |
| szClientID = tbBut.ClientID; |
| //and again... |
| RadToolbarToggleButton tbBut = (RadToolbarToggleButton)MSAToolbar.FindControl("RadToolbarToggleButton2"); |
| szClientID = tbBut.ClientID; |
is there any way I can accomplish the above written task (getting the ClientID and changing the Toggled property)