K
Ken Baltrinic
Can someone explain this?
I am writing an owner rendered User Control that basically wraps some
functionality around a text box. This control uses client side javascript
and implments IPostBackDataHandler. In order for my JaveScript to find the
control using GetElementByID I must emit Control.ClientID as the value of
the ID attribute of my textbox and in order for the postback handling
mechanism to link up that same textbox with my control's
PostbackDataHandler, I must emit Control.UniqueID as the value of the name
attribute.
I understand why I have to put a value in both the Name and ID attributes
but what I don't get is why are they different values? My rendered textbox
comes out looking like this:
<input id="_ctl0_datReportDate" name="_ctl0:datReportDate" ... >
Can anyone explain why these values need to be different and why we have two
properties on the Control class for them?
--Ken
I am writing an owner rendered User Control that basically wraps some
functionality around a text box. This control uses client side javascript
and implments IPostBackDataHandler. In order for my JaveScript to find the
control using GetElementByID I must emit Control.ClientID as the value of
the ID attribute of my textbox and in order for the postback handling
mechanism to link up that same textbox with my control's
PostbackDataHandler, I must emit Control.UniqueID as the value of the name
attribute.
I understand why I have to put a value in both the Name and ID attributes
but what I don't get is why are they different values? My rendered textbox
comes out looking like this:
<input id="_ctl0_datReportDate" name="_ctl0:datReportDate" ... >
Can anyone explain why these values need to be different and why we have two
properties on the Control class for them?
--Ken