470,648 Members | 1,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,648 developers. It's quick & easy.

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 1622
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by shine | last post: by
reply views Thread by Rob Meade | last post: by
6 posts views Thread by Todd A | last post: by
10 posts views Thread by Tony Abate | last post: by
1 post views Thread by Arpan | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.