Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   How to share common code among pages in asp.net 2.0 (http://www.velocityreviews.com/forums/t526258-how-to-share-common-code-among-pages-in-asp-net-2-0-a.html)

just_life 08-01-2007 05:31 PM

How to share common code among pages in asp.net 2.0
 
My main .aspx page has a page directive as follows:

"<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Question3.aspx.vb"
Inherits="Question3" CodeFileBaseClass="BasePage" %>"

My App_Code folder has a file named Class1.vb whose contents are:

Imports Microsoft.VisualBasic
Imports System.IO
Imports System.Text
Imports System.Data.OracleClient
Imports System
Imports System.Data

Public Class BasePage Inherits System.Web.UI.Page
Public Shared Function TrimComplete(ByVal sValue As String) As String
Return TrimComplete
End Function
End Class

My codebehind file has the following:

Imports System.IO
Imports System.Text
Imports System.Data.OracleClient
Imports System
Imports System.Data

Partial Class Question3
Inherits BasePage

And I get the error: Parser Error Message: Could not load type 'BasePage'.

Please Help. Whar am I doing wrong?



All times are GMT. The time now is 11:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.