Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 23rd, 2005, 10:07 AM
Authorized User
Join Date: Oct 2004
Location: Bangalore, Karnataka, India.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Saving Code behind in another folder Visual Studio


    I have a module "Country"

    I want to store the code behind file in another folder say "CodeBehind". So I used the Src instead of CodeBehind.

<%@ Page language="c#" Src="CodeBehind/countryListing.aspx.cs" AutoEventWireup="false" Inherits="Admin.Country.countryListing" %>

    But the aspx page is not opening in Design view in Visual Studio .Net

Anybody have idea on saving Code behind in another folder in Visual Studio .Net

  #2 (permalink)  
Old December 23rd, 2005, 10:21 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

The "CodeBehind" attribute in the page tag tells visual studio where the code-behind file lives. This attribute is for the convenience of visual studio only.

The "Src" tag tells the ASP.NET engine that you want that ASPX page to compile the referenced file. It does not make any direct link between the file referenced and the file referencing it.

The "Inherits" attribute tells the ASP.NET engine what class the ASPX page should derive from. The desired class can live in the code file referenced by the "Src" file or in any assembly found in the application's \bin folder or in the .NET global assembly cache (that's where System and System.* are found).

If your goal is to "hide" the code files used for the pages just precompile everything so you don't have to distribute the code-behind.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using ASP.NET Code-Behind Without Visual Studio.NE rupen ASP.NET 1.0 and 1.1 Basics 0 October 12th, 2005 05:21 AM
Using Visual Studio vb.Net to build code sirandre007 Classic ASP Basics 1 March 28th, 2005 07:52 PM
Visual Studio solution file for sample code? davem1958 ASP.NET 1.0 and 1.1 Professional 1 October 10th, 2003 12:06 PM

All times are GMT -4. The time now is 05:06 AM.

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