Setting asp.net text box value using jquery with ajaxcontroltoolkit watermark -


i using asp.net textboxes ajaxcontroltoolkit watermark control. there list box entries can edited using text boxes. on selection change of list box need set text in text box. using jquery purpose.

three predefined values added in list box. there 2 scenarios -
1. when entry added manually using text boxes, text appears in text box
2. if predefined entry selected without adding manual entry, text appears in text box watermark , not editable.

here code -

... controls here <asp:textbox id="ebsectionenglish" runat="server" cssclass="basictextbox" width="215px" />                                 <act:textboxwatermarkextender watermarkcssclass="textboxwatermark"      id="tbwsectionenglish" runat="server" targetcontrolid="ebsectionenglish"      watermarktext="english" /> <asp:listbox id="lbsection" runat="server" width="215px" rows="6"></asp:listbox> ... more tags  // script code var selitem = jquery('[id$=lbsection] option:selected'); if (selitem == null)    return false; jquery('[id$=ebsectionenglish]').val(selitem.val()); ... more script 

i using jquery 1.5. highly appreciated.

use set text: $find("<%= tbwsectionenglish.clientid %>").set_text(value);


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -