11 July 2008

VB: Regular Expressions, etc...

Regex.IsMatch("subject", "regex") ' Checks if the regular expression 
' matches the subject string.

VB: using Controls collection

' Clears textbox controls' content on the form using 
' Controls collection.
Dim intX As Integer
Do While intX < text = "" intx =" intX">

ViewState("UrlReferrer")

Sub Page_Load()
    If Page.IsPostBack = False Then
        ' Store URL Referrer to return to home page.
        ViewState("UrlReferrer") = Me.Request.UrlReferrer.ToString()
    End If
End Sub

Sub CancelBtn_Click()
    ' Redirect back to the home page.
    Me.Response.Redirect(CType(ViewState("UrlReferrer"), String))
End Sub
 

No comments:

header adsense code