Jump to content

Can not switch to design view


ShauNotDeaD
 Share

Recommended Posts

I know this is a pretty newbie question, but I just got hired by a small company with an advanced website. Their site is mostly in .asp, but they have been here forever and hardcoded all the .asp. I, however, want to use the GUI and create my pages faster, so here's my problem:When I try to switch to design view, I get the error "can not switch to design view because of errors in the page". I check all the cannot switch errors and correct the easy ones. The ones I can't correct are those that say "</table> cannot come before <table>" and "<html> not found in file". The reason you don't find the html tag is because it is in the toolbar that scrolls the top of every page. Browsers know this because the server includes them with <!-- #include "default_intranet_library_toolbar.asp..." etc. (Every intranet page is also on my machine in inetpub/wwwroot/... etc. and that's how I access them via browser: http://localhost/intranet/... etc.Surely, there's a solution. How do I get .NET to work it out like my browser can do?First post :) and thanks for any replies

Link to comment
Share on other sites

Are you using Visual Studio 2003??? If so it is a bug in the program.Post the FULL code of this page and I'll tell you if it the bug that is causing this.
<%@ Language=VBScript %><%Option Explicit 'require variables be explicitly declared.'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Filename: Default.asp''Purpose: Displays the home page of the Intranet. ''Inputs: Section''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Response.Buffer=True%><!-- #INCLUDE VIRTUAL="/i2/Library/intranet_library.asp" --><!-- #INCLUDE VIRTUAL="/i2/Applications/PRLibrary.asp" --><%'ConstantsConst intRECENT_NEWS_TO_DISPLAY = 3Call Main()Sub Main... (variable declarations)Call DisplayHomePage(adoConnection, strEmployeeNumber, strEmpDept, strEmpVPID)... (other code)Function DisplayHomePage(adoConnection, strEmployeeNumber, strEmpDept, strEmpVPID)%><!--Navigation Footer--></td></tr></table><table CELLPADDING="0" CELLSPACING="0" WIDTH="440" BORDER="0" ALIGN="LEFT" VALIGN="TOP"><tr><td WIDTH="435" ALIGN="LEFT" VALIGN="TOP" COLSPAN="3"></td></tr><TR height=6><TD></TD></TR><%End Function

My first errors are generated in the DisplayHomePage function: on </td>: Cannot switch views: this end tag has no start tag. The start tags for them are located in the "/i2/Library/intranet_library.asp".I am using VS2005.Thanks!

Link to comment
Share on other sites

have you used functions made like that before??? I doubt that would work.Not to be iopinionated but your style of coding breaks about everything ASP.Net stands for. You are using classic ASP scripting style which really defeats the purpose of switching to .Net.Since you have vs 2005 start using the code behind and having it compiled. You will get code that is faster and easier to manage.

Link to comment
Share on other sites

have you used functions made like that before??? I doubt that would work.Not to be iopinionated but your style of coding breaks about everything ASP.Net stands for. You are using classic ASP scripting style which really defeats the purpose of switching to .Net.Since you have vs 2005 start using the code behind and having it compiled. You will get code that is faster and easier to manage.
Kinda had a feeling that was the case. The other guys refuse to change their ways and insist on coding their LONG SLOW way... Oh well, no toolbars then...Thank you aspnetguy!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...