|
-
April 4th, 2008, 06:43 PM
#1
Base Class
If I create a base class for my pages which will open my Database connection, load user data etc. Can I also define commonly used imports files in this class, when I do this currently it doesn't reference them
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient
Imports database ' Class that would be used by child page
Public Class BasePage
Inherits System.Web.UI.Page
Private _Conn As SqlConnection
Public ReadOnly Property Conn() As SqlConnection
Get
If _Conn Is Nothing Then
_Conn = Utility.GetConnection
End If
Return _Conn
End Get
End Property
End Class
-
April 5th, 2008, 03:08 AM
#2
Re: Base Class
Imports is usually only applicable to the module in which it is written.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|