Im using asp.net 2.0 and the Ajax Web Extensions.
I create a control with a label (lblStudentID) and when the page renders, it becomes XXXXX_XXXXX_ControlInstanceName_PanelInstanceName_OriginalControlID
If I use Javascripts
or Microsoft Ajaxs
they wont find a reference to the control. If it were an HTML control, this wouldnt be a problem as ASP.Net 2.0 doesnt rename their IDs.
The problem Im seeing is that in my control, I only have control over the PanelInstanceName & OriginalControlID. I have no idea which control(s) (if any) that my usercontrol will be used in.
Is there a programatical way to determine what that name would be? We were hoping that MSAjax would take the ServerSideID and find the ClientSideID, but no dice. On all examples Ive seen (AppDev videos, Ajax.ASP.Net or documentation) they use either an html control or hardcode the generated name.
Im looking for something via Javascript or MSAjax Javascript that would get me the "XXXXX_XXXXX_ControlInstanceName" portion that I dont know about and would allow me to append the portion of the name I will know.
Something like
that would allow me to create the dynamic client name.
Anyone have any tips or advice? Ive been googling for days and maybe Im not using the correct terms, but Im not finding anything. Id greatly appreciate any help on this subject
I create a control with a label (lblStudentID) and when the page renders, it becomes XXXXX_XXXXX_ControlInstanceName_PanelInstanceName_OriginalControlID
If I use Javascripts
Code:
document.forms[0].getElementById(OriginalControlID)
Code:
$get(OriginalControlID)
The problem Im seeing is that in my control, I only have control over the PanelInstanceName & OriginalControlID. I have no idea which control(s) (if any) that my usercontrol will be used in.
Is there a programatical way to determine what that name would be? We were hoping that MSAjax would take the ServerSideID and find the ClientSideID, but no dice. On all examples Ive seen (AppDev videos, Ajax.ASP.Net or documentation) they use either an html control or hardcode the generated name.
Im looking for something via Javascript or MSAjax Javascript that would get me the "XXXXX_XXXXX_ControlInstanceName" portion that I dont know about and would allow me to append the portion of the name I will know.
Something like
Code:
$get(ControlParent + "_PanelInstanceName_OriginalControlID"
Anyone have any tips or advice? Ive been googling for days and maybe Im not using the correct terms, but Im not finding anything. Id greatly appreciate any help on this subject