Click here to Skip to main content
15,897,371 members
Articles / Web Development / ASP.NET

Using Resource Files In ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.27/5 (28 votes)
20 Jan 200310 min read 338.2K   4K   98  
Using resource files in ASP.NET.
Public MustInherit Class UserInfo
    Inherits System.Web.UI.UserControl
    Protected WithEvents btnSave As System.Web.UI.WebControls.ImageButton
    Protected WithEvents password2 As System.Web.UI.WebControls.TextBox
    Protected WithEvents password1 As System.Web.UI.WebControls.TextBox
    Protected WithEvents Email As System.Web.UI.WebControls.TextBox
    Protected WithEvents phone As System.Web.UI.WebControls.TextBox
    Protected WithEvents lname As System.Web.UI.WebControls.TextBox
    Protected WithEvents mi As System.Web.UI.WebControls.TextBox
    Protected WithEvents rank As System.Web.UI.WebControls.TextBox
    Protected WithEvents fname As System.Web.UI.WebControls.TextBox
    Protected WithEvents lblTitle As System.Web.UI.WebControls.Label

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    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
        Dim bClearText As Boolean
        If Not Session("ClearText") Is Nothing Then
            bClearText = CBool(Session("ClearText").ToString)
        End If

        ClearEntries(bClearText)
    End Sub

    Private Sub ClearEntries(ByVal bClear As Boolean)

        If bClear Then

            password2.Text = ""
            password1.Text = ""
            Email.Text = ""
            phone.Text = ""
            lname.Text = ""
            mi.Text = ""
            rank.Text = ""
            fname.Text = ""
        End If

    End Sub

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
Dwight N. Goins, MCT, MCSD, MCAD

Is a Microsoft Education Consultant with Hewlett-Packard. He teaches Microsoft Official Cirriculum with HP (formerly Extreme Logic).
He has also authored Courseware and Manuals for BizTalk Server 2004 and Microsoft Partners.

Dwight.Goins@hp.com
dngoins@hotmail.com

Comments and Discussions