Click to See Complete Forum and Search --> : Newbie! Renaming pages/forms in Visual Web Developer Express


Nostromo77
10-15-2006, 10:38 PM
Hello,

I'm new to Visual Web Developer Express. I'm attempting to do something that would be relatively simple in an ordinary HTML website, but which seems to be somewhat more complicated in a DB-driven site: I want to "swap" two web pages by renaming them. That is, I want to resave a page named "Main_User" as the new index page, and resave the current index page under a different name.

When I attempt to do this, and upload changed .aspx pages into the FTP folder (not using VWD to upload), I get a parser error when trying to access one of the "new" pages.

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="retailer_login.aspx.vb" Inherits="[websitename].retailerlogin1"%>

As shown above, I have changed the language in the first line of code to reflect the changed page name (replacing "index" with "retailer_login"), but I'm missing something. VWD tutorials focus on creating new sites from scratch, rather than "renovating" existing sites. I may eventually figure this out by reading, but wondered if I was commiting some simple error that someone could point out....

Thank you very much!

vinyl-junkie
10-15-2006, 11:08 PM
I don't know if VWD behaves the same way that visual studio does, but with Visual Studio, when you rename the web page it automatically renames the code-behind page.

On your web page, you need to change "Codebehind=" name to whatever the new code-behind filename is. Also change "Inherits=" to the class name used in your code-behind files. Your code-behind file may need to have its class name changed, too, depending on what you have in it.

Nostromo77
12-01-2006, 12:10 AM
Thanks very much for the answer, I do appreciate it.