Monday, May 05, 2025

Breaking News
>> Securing and encrypt View State and Cookies values  >> Page has one or more controls that do not correspond with   >> “The Controls collection cannot be modified because the control contains code blocks”  >> How to fix "Validation(): Element 'xxxx' is not supported  >> How to create a new session in ASP.NET programmatically  >> MySQL Database Backup using mysqldump command    

Editors Picks

Friday, July 16, 2010

Watermarked TextBox without using Ajax or javascript



<tr>
    <td><input id="member_first_name"  runat="server" type="text" class="input_text" value="Name" onfocus="if(this.value=='Name'){ this.value=''; }" onblur="if(this.value==''){ this.value='Name'; }" size="20" style="width:170px;" /></td>
  </tr>
  <tr>
    <td><input id="member_email"  runat="server"  type="text" class="input_text" onfocus="if(this.value=='Email Address'){ this.value=''; }" onblur="if(this.value==''){ this.value='Email Address'; }" value="Email Address" size="20" style="width:170px;" /></td>
  </tr>
  <tr>
    <td><input id="contact_no"  runat="server"  type="text" class="input_text" onfocus="if(this.value=='Contact No'){ this.value=''; }" onblur="if(this.value==''){ this.value='Contact No'; }" value="Contact No" size="20" style="width:170px;" /></td>
  </tr>
  <tr>
    <td><label>
      <textarea name="comments" runat="server"  id="textarea" class="input_textarea" cols="25" rows="5" onfocus="if(this.value=='Enter your query here'){ this.value=''; }" onblur="if(this.value==''){ this.value='Enter your query here'; }" style="width:170px;">Enter your query here</textarea>
    </label></td>
  </tr>

1 comment :

Contact Us

Name

Email *

Message *