Results 1 to 2 of 2

Thread: Copying a file in VS.net

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Copying a file in VS.net

    Sorry about the xpost. I made a wee mistake earlier.
    ======================================

    I have a page in my web project "Webform.aspx" which has the general layout of all my pages and a blank code behind page
    .
    What I do is :

    1) Copy the page and paste it into Visual Studio.
    2) Rename it to......lets say "Webform1.aspx"
    3) Change the code behing page so it reads
    Public Class WebForm1

    Whenever I try to run this new blank page I get the error :

    Could not load type '_myProject.WebForm1'.

    Can someone tell me how to do this. I am finding Visual Studio great for coding but at simple screen handling and general maintenance It is hopeless.

    Thanks in Advance

    Parksie

  2. #2
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    In the HTML of the copied page have you should try changing the inherits call to the name of the new page.

    VB Code:
    1. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1Copy.aspx.vb" Inherits="ProjectName.WebForm1Copy"%>

    Also, rebuild your solution so the code behind is compiled and placed in your bin directory...

    hth
    MarkusJ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width