Click here to Skip to main content
11,569,923 members (51,612 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
Hi.. Am creating registration form. Here am not using label for specify the particularies instead am using textbox. So how can i use water mark in with out using jscript and css??
Posted 8-Jan-13 18:11pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

hey refer below code:
<asp:textbox id="Name" runat="server" xmlns:asp="#unknown" /> 
 
     <asp:button id="btn" runat="server" text="Submit" onclick="btn_Click" xmlns:asp="#unknown" />
 
     <asp:label id="lbl" runat="server" xmlns:asp="#unknown" />
<ajaxtoolkit:textboxwatermarkextender id="tbwe" runat="server" xmlns:ajaxtoolkit="#unknown">
 TargetControlID="Name" WatermarkText="Enter Your Name" /></ajaxtoolkit:textboxwatermarkextender>
and also refer below link:
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/TextBoxWatermark/TextBoxWatermark.aspx[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

You can use PlaceHolder Attribute of textbox which is an html5 input attribute.

eg: Placeholder="UserName"


It'll act as the watermark..
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It's not possible to watermark a textbox. And nothing is possible in terms of styling without css. Jscript is only useful if you use it to set css.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


Advertise | Privacy | Mobile
Web04 | 2.8.150624.2 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100