title: Prepopulated textbox value to disappears onclick
body: <p>My textboxes on the page are pre-populated with either required text or 'Enter Text'.</p>
  
  <p>If the boxes have 'Enter Text', I'd like the those texts to disappear onclick on the box. But if nothing is entered, then the textbox returns to having pre-populated 'Enter Text'.</p>
  
  <p>If the boxes are populated with other texts (other than 'Enter Text', then I'd like it to stay as is.</p>
  
  <p>This is what I've got so far on the code-behind:</p>
  
  <pre><code> txtBox.Attributes.Add("onblur", "if(this.value='Enter Text') {this.value=''} else if(this.value.length&lt;=0) {this.value='" + prepopulatedText.ToString() + "'} ");
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>Any ideas?</p>
  
  <p>Should I be using "onClick" instead too?</p>