Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2005, 12:16 PM
Registered User
 
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default PreviousPageType

I am trying to use the PreviousPage property to refer to a textbox on my HomePage.aspx page where I have setup the Public Readonly Property. On my Page2.aspx page, I have

<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Page2.aspx.vb" Inherits="Page2" title="Untitled Page" %>
<%@ PreviousPageType VirtualPath="~/HomePage.aspx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2"
    Runat="Server">
    <asp:TextBox ID="txtDocNbr" runat="server"
        Style="z-index: 100; left: 576px; position: absolute;
        top: 228px" Width="96px">
    </asp:TextBox>
</asp:Content>

After I type in the <%@ PreviousPageType directive, the <%@ Page is underlined as an error. The error says "Type 'ASP.HomePage_aspx' is not defined". What does this mean?

 
Old July 27th, 2005, 02:04 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Nolanb,

What version of Visual Web Developer are you using?

I tested this in the Beta 2 Express edition and I get the same error. However, newer releases don't have this problem. I get a temporary error on the Register directive that follows the PreviousPageType directive, but as soon as I close and reopen the page that error is gone.

So, I think this is a bug in your version of VWD.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: 1969 by Haldolium (Track 7 from the album: H2 Trance CD) What's This?
 
Old August 2nd, 2005, 12:14 PM
Registered User
 
Join Date: Jul 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have Visual Studio 2005, Version 8.0.50215.44 (beta2.050215-440) and .Net Framework version 2.0.50215. I did downloaded and reinstall VWD but still get the same error. Guess I will try to use a Query String to pass values to other pages.

 
Old August 2nd, 2005, 12:57 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Do you get the error at run-time or at design time?

Quite often, the design time errors are faults of VWD, not of the .NET Framework so they might run fine.

Did you try setting the TypeName attribute instead of VirtualPath?

BTW, version 8.0.50215.44 *is* beta 2, so you're using an older version. Since this version was released, new versions have been released as well, to a closer audience (MSDN subscribers).

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.