1

I am creating a composite control that has a textbox and uses a jquery plugin to add a watermark. Lets say I have a basic function that looks like this

$(function () {$('#MyTextBoxID').watermark('Enter your username');});

Can anyone suggest what I need to do to insert the above?

TIA!

Noelkd
  • 7,686
  • 2
  • 29
  • 43
Diver Dan
  • 9,953
  • 22
  • 95
  • 166

1 Answers1

0

You can register a startup script and using it you can do following:


 Dim cs As ClientScriptManager = Page.ClientScript
 If (Not cs.IsStartupScriptRegistered(cstype, csname1)) Then
      Dim cstext1 As String = "$(function () {$('#" & Me.ClientID & "').watermark('Enter your username');});"
      cs.RegisterStartupScript(cstype, csname1, cstext1, True)

End If



tyriker
  • 2,290
  • 22
  • 31
Prashant Lakhlani
  • 5,758
  • 5
  • 25
  • 39