Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Client-side events with Web Form Controls/Validation Controls


Message #1 by "Max Dagenais" <max_dagenais@h...> on Thu, 7 Feb 2002 00:27:01
Thanks Aiden, Francois and Graham.

The following one from Ken also suggests Attributes and Register.

Thanks Ken,

Max.



The capabilities are there, but not easily found. You can add your own
attributes and script like this:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

TextBox1.Attributes.Add("onblur", "sayword('hello');")

RegisterClientScriptBlock("myscript", "<script>function
sayword(inval){alert(inval);}</script>")

End Sub

In the documentation, look up the various Register* methods in

ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemwebuipagememberstopic.htm

and

ms-
help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemwebuipageclassregisterclie
ntscriptblocktopic.htm

Does this help?

Ken
MVP [ASP.NET]


  Return to Index