473,804 Members | 3,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.Net 2.0 frm2 Inherits frm1

Hi
with visual studio 2005 beta 2 i have created two form:
frm1 (Inherits System.Web.UI.P age)
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.P age

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArg s) Handles Me.Load
Me.TextBox1.Tex t = "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 1731
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.P age)
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.P age
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArg s) Handles Me.Load
Me.TextBox1.Tex t = "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
6703
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 shine
4
7192
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 name for the page that will be dynamically compiled automatically when the page is requested. This value can be any valid class name but should not include a namespace. So this is what will decidw what gets compiled? Then what is the point of...
0
1047
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 and redirects the user to the Clinical Portal to login if not etc. I have dragged the .ascx (SessionCheck.ascx) across and thought all was well
6
1472
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 insert my own base page to inherit from, say,
0
1150
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 runat=server></{0}:Rotator1>")> Public Class Rotator1 Inherits System.Web.UI.WebControls.WebControl Public Items As New ArrayList()
10
2162
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 .aspx.vb file in the original directory, but cannot do so with the Inherits property. I know one solution is to place the DLL file in the new directory with my .aspx file, but I would like to avoid this as it would require me to update all the...
2
1377
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 or C can be passed to it. 4. In this function, I need to determine whether the object passed to it inherits A or not.
5
19604
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 having a problem in the calling program. I searched online and found suggestions that I return an Array instead so I modified my code (below) to return an Array instead of an ArrayList. Now I get the message when I try to run just my webservice...
1
1467
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 Public Class Constr : Inherits Page Public Sub New()
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10332
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.