Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
WebDatePicker Client ID
posted

Hello

I am using the WebDatePicker control, and the date picker text box renders like:

<input title="" class="igte_EditInContainer" id="x:2036271367.0:mkr:3" style="width: 98%; height: 100%; float: left; ime-mode: disabled;" type="text" alt="" mkr="3"/>

All what i need is to have a way to change the generated client ID of this control.

is there anyway to change it?

Thanks

Parents
No Data
Reply
  • 24497
    posted

    Hi Wesam,

    The value of that id is generated by server and it has special internal format, which allows to find that element on client. On client that id is used only while initialization and I think that after internal variables are intialized, then id probably can be modified.

    If you ask about changing that id on server before html is generated, then it is not possible. If you ask about changing that id on client, then you may use something like below:

    <script type="text/javascript">
    function WebTextEditor1_Initialize(sender, eventArgs) {
      
    sender.get_inputElement().id = 'myCustomUniqueID';
    }
    </script>

    <ig:WebTextEditor ID="WebTextEditor1" runat="server">
      
    <ClientEvents Initialize="WebTextEditor1_Initialize" />
    </ig:WebTextEditor>

Children
No Data