CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: Date Entered: 12/27/2005 10:53:55 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 29 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
"haroldb" <>
NewsGroup User
Is there a way to edit pages that require the #includes to be valid?12/27/2005 10:53:55 PM

0

I took our existing ASP.NET web site, which was not developed using Visual Studio, and tried to work on it with Visual Studio.  What I discovered is that the way the developer implemented the site each individual file is not valid HTML unless the server side includes are processed.  So VS can't bring up the page designer for the pages (since it finds so many errors in the file representing the page).  I've looked around for a way to tell VS to deal with the #includes (e.g., something like "Validate in context of server-side includes") without any luck.  Is there a way to do this?

 

"AlvinVi" <>
NewsGroup User
Re: Is there a way to edit pages that require the #includes to be valid?12/28/2005 3:24:17 AM

0

To validate #include, you must declare #define preprocessor directive. After these variable is declared, check for its existence by using #ifdef or #ifndef directive. For example,

// File1.cpp
#ifndef FILE1
#define FILE1
// your codes here...
#endif

//MainFile.cpp
#include File1.cpp
// your codes here...
#ifdef FILE1
      // codes for file1.cpp here
#else
      // codes here if file1.cpp is not included
#endif

"Mikhail Arkhip
NewsGroup User
Re: Is there a way to edit pages that require the #includes to be valid?12/28/2005 6:49:16 AM

0

If you mean <!-- #include foo.aspx -->, this syntax is not supported in the VS designer, sorry. Designer only shows design time HTML, it does not actually run any server or client code. Hence anything that requires files to be combined at runtime won't work in the designer. Only basic editing in Source view is provided.
Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
3 Items, 1 Pages 1 |< << Go >> >|




   
  Privacy | Contact Us
All Times Are GMT