in my web application i am using javascript for water mark text in textboxes it is working fine but for textbox if TextMode property set to Multiline then the water mark text is not displaying is there any particular reason. this is my code…
<TextBox ID="txtone" runat="server" tooltip="Enter comments"
onblur="if(this.value=='') this.value='Enter text,150 characters only';"
onfocus="if(this.value == 'Enter text,150 characters only') this.value='';"
value="Enter text,150 characters only">
</TextBox>
When a
TextBoxis in multiline mode, it’s rendered as atextareainstead of aninputelement. Thetextareaelement doesn’t use thevalueattribute, so your code fails to set the initial value.Use the
Textproperty of the server control instead of thevalueargument of the client control: