Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Page.Header.DataBind()
Dim s As New StringBuilder()
s.Append(" function pageLoad(sender, args) {")
s.Append(" $addHandler(document, 'keydown', SEX_keydown);")
s.Append(" }")
s.Append(" function SEX_keydown(args) {")
s.Append(" if (args.keyCode == Sys.UI.Key.esc) {")
s.Append(" $find('" & youModalForm.FindControl("MPE_OKCancel").ClientID & "').hide();")
s.Append(" }")
s.Append(" }")
ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "SEX_keydown", s.ToString(), True)
End If
End Sub