In my CreateChildControls() method, I am creating a control:
HtmlGenericControl mycontrol= HtmlGenericControl("li");
mycontrol.ID = "controlID";
controlId = mycontrol.ID;
protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors()
{
ScriptControlDescriptor descriptor = new ScriptControlDescriptor("Project.TEditor", this.ClientID);
descriptor.AddProperty("controlId", controlId);
return new ScriptDescriptor[] { descriptor };
}
After that, when I try to access this control in JavaScript using the ID property:
alert($get(this.get_controlId()));
I am getting null because the actual control ID has a prefix added by ASP.
Is there a way to solve this issue?