473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ASP.Net 2.0 frm2 Inherits frm1

Hi
with visual studio 2005 beta 2 i have created two form:
frm1 (Inherits System.Web.UI.Page)
frm2 (Inherits frm1)

but in the line code :
Inherits frm1
vs send error: type frm1 is not defined

***** frm1.aspx *****
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frm1.aspx.vb"
Inherits="frm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>frm1 Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>

***** frm1.aspx.vb *****
Partial Class frm1
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Me.TextBox1.Text = "Prova"
End Sub
End Class

***** frm2.aspx *****
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frm2.aspx.vb"
Inherits="frm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>frm2 Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

</div>
</form>
</body>
</html>
***** frm2.aspx.vb *****
Partial Class frm2
Inherits frm1 'error: type frm1 is not defined

End Class
Where is the error!
Thanks!!!
Nov 19 '05 #1
1 1712
On frm2.aspx add:
<%@ Reference Page="frm1.aspx" %>

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi
with visual studio 2005 beta 2 i have created two form:
frm1 (Inherits System.Web.UI.Page)
frm2 (Inherits frm1)
but in the line code :
Inherits frm1
vs send error: type frm1 is not defined
***** frm1.aspx *****
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frm1.aspx.vb"
Inherits="frm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>frm1 Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server"
Text="Label"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>

***** frm1.aspx.vb *****
Partial Class frm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Me.TextBox1.Text = "Prova"
End Sub
End Class
***** frm2.aspx *****
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frm2.aspx.vb"
Inherits="frm2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>frm2 Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

***** frm2.aspx.vb *****
Partial Class frm2
Inherits frm1 'error: type frm1 is not defined
End Class

Where is the error! Thanks!!!


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: shine | last post by:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="shine.WebForm1" %> what does Inherits means in this tag, what is the use of it plz explain me regards...
4
by: Ben R. | last post by:
Between ClassName and Inherits, which attribute is set to specify the class that a page uses? I would think that would be inherits. Further, the description for ClassName is: Specifies the class...
0
by: Rob Meade | last post by:
Hi all, ok - the scenario... We have a secure login page known as the Clinical Portal (single login etc) - we have a web user control for this which checks if a session is available or not...
6
by: Todd A | last post by:
If I use the following in my code behind page: Public Class _Default Inherits System.Web.UI.Page The page will compile with no errors from the command line compiler (vbc.exe) But, If I...
0
by: Alex Nitulescu | last post by:
Hi, I have the following in project "RaducuCustomControls": Imports System.ComponentModel Imports System.Web.UI <DefaultProperty("Text"), ToolboxData("<{0}:Rotator1...
10
by: Tony Abate | last post by:
I am working on an ASP.NET app that is going well except for one thing. I build my application and then move the .aspx file to a different directory. I can point the Codebehind property back to the...
2
by: Don | last post by:
1. Say I have three classes: A, B and C. 2. Class A can only be inherited, and B inherits it. C does not inherit anything. 3. I have a function that can have an object passed to it. Either B...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
1
by: Arpan | last post by:
What's the difference between "Imports" & "Inherits"? For e.g. both the codes below work without any errors: Imports System Imports System.Data Imports System.Web.UI Namespace Constructors...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.