PC Review


Reply
Thread Tools Rate Thread

ASP.Net 2.0 frm2 Inherits frm1

 
 
=?Utf-8?B?Um9iZXJ0byBCaW5kaW5p?=
Guest
Posts: n/a
 
      9th Aug 2005
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!!!


 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      9th Aug 2005
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!!!
>




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recall data from tbl1 & tbl2 on frm2 drrajnishpatel via AccessMonster.com Microsoft Access Forms 0 5th Mar 2008 10:57 AM
sync filterization of frm2 with current record of frm1 =?Utf-8?B?TEY=?= Microsoft Access Forms 0 31st Jan 2007 01:21 AM
c++ inherits c# d g via .NET 247 Microsoft VC .NET 1 4th Apr 2005 04:49 PM
Inherits from Control, Yay, Inherits from WebControl, Nay.... Alex Nitulescu Microsoft ASP .NET 0 22nd Feb 2005 05:55 AM
data on frm1 to show on frm2 brinalynn Microsoft Access Form Coding 4 24th Aug 2004 07:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:21 AM.