Hi,
I suspect this has been covered already, but I have been unable to locate an answer that resolves the issue I have so far. Been searching around for a while now and im sure its a simple issue that im just miss-understanding.
I am new to ASP.NET forms but am familiar with VBA in excel and various other programming languages.
I have a local SQL database created for testing with, and im using Visual Studio Express 2013.
The long term goal is to create a web front end with IIS integrated security that shows data from and allows input into the SQL backend to create new entries.
I managed to get a asp.net web form created that connected to the database and then displayed the SQL query results in a repeater table with no issues. The problem I have is that I then moved into the master.page setup of the project and now have trouble with my codefile being referenced.
All files live in one directory:
Default.aspx
Site.master.vb
Site.master
All I want to do is have one code file that has subroutines such as my SQL connect script, and search queries etc. That can be used on various aspx pages. Unfortunately with the current setup I receive the following error:
I suspect this has been covered already, but I have been unable to locate an answer that resolves the issue I have so far. Been searching around for a while now and im sure its a simple issue that im just miss-understanding.
I am new to ASP.NET forms but am familiar with VBA in excel and various other programming languages.
I have a local SQL database created for testing with, and im using Visual Studio Express 2013.
The long term goal is to create a web front end with IIS integrated security that shows data from and allows input into the SQL backend to create new entries.
I managed to get a asp.net web form created that connected to the database and then displayed the SQL query results in a repeater table with no issues. The problem I have is that I then moved into the master.page setup of the project and now have trouble with my codefile being referenced.
All files live in one directory:
Default.aspx
VB.NET:
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" CodeFile="Site.master.vb" Inherits="Site.master" %>
Site.master.vb
VB.NET:
Imports System.Data.SqlClient
Namespace Site
Partial Class master
Inherits System.Web.UI.Page
Site.master
VB.NET:
<%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site.master" %>
All I want to do is have one code file that has subroutines such as my SQL connect script, and search queries etc. That can be used on various aspx pages. Unfortunately with the current setup I receive the following error:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
Source Error:
Line 2:
Line 3: Namespace Site
Line 4: Partial Class master
Line 5: Inherits System.Web.UI.Page
Line 6:
Source File: C:\VisualStudio\WebSite\Salesbook\Site.master.vb Line: 4