Visual Studio .NET - How to include seperate .cs files?
Asked By Kevin R
27-Oct-06 12:29 PM
I have an asp.net 2.0 app running on Win2003 server adn I have seperate .cs files that have methods that I call on. When I run the app on my development machine it runs fine, but on the server it doesn't see the seperate .cs files. Anyone know what I can do to fix this?
Compiler Error Message: CS0103: The name 'DataHandler' does not exist in the current context
I wouldn't even consider deploying .cs files
Suggest trying the ASP.NET 2.0 Web Application Projects add-in, which compiles all to a single assembly in the /bin folder. Then you don't have to deploy any .cs files because they're all compiled in advance.
Kevin R replied to Peter Bromberg
How do I go about doing that?
Even .dll didn't help!!
I compiled the seperate .cs code files into a dll and added them as a reference into the project. Built it and it compiled sucessfully. When I ftp'd it up to the server, I still get the same error... CS0103: The name 'DataHandler' does not exist in the current context
use these steps
Use these steps
Step1: Go to the Option Build ->Publish Site
Step2: Select the destination folder and copy that folder to development server
OR
if you are using FTP then give that path and copy that files to development server.
So that contains All necessary files to run the application not cs files and your application will work fine.
Kevin R replied to Sachin Mishra
On my development machine, the path to the code-behind/pics/etc was in the webs main dir. When I made it on the server, the path was not part of the webs main dir. (Ex: dev mch [C:\Inetpub\wwwroot\webdir\page.aspx] as per server [D:\Inetpub\wwwroot\webdir\main\page.aspx]). So when it was trying to find the code-behind files it was looking in the main dir, not any of the sub-directories. How do you tell it to look for the files in a specific sub-directory is beyond me right now. Im just learning as I go.

Interview Questions for .NET Framework This article is specially for the users those are in development or want to be a .net developer • To test a Web Service you must create a windows application or web application to consume this service? It is True / False? FALSE How many classes can a single NET DLL contain? Answer1: As many Answer2: One or more What are good ADO.NET object(s) to replace the ADO Recordset object? The differences includes In ADO, the in-memory representation of data is the recordset. In ADO.net, it is the dataset A recordset looks like a single table in ADO In contrast a dataset is a collection of one or more tables in ADO.net ADO is designed primarily for connected access ADO.net the disconnected access to the database
Frequently asked Interview Questions in ADO.Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B B) What is concept of Boxing and Unboxing ? (B) What is the difference between VB.NET and C#? (I) what is the difference between System exceptions and Application exceptions? (I)What is CODE Access security? (I)What is a satellite assembly? (A) How to prevent my .NET DLL to be decompiled? (I) what is the difference between Convert.toString and .toString () method
ASP.net configuration how to do ASP.net configuration? Every website can be configured using Asp.NET WebSite Configuration which is present in IDE of Visual Studio. It is present in WebSite menu of IDE of Visual Studio. Here u can set
Code Optimization I want tips and guidlines to make my ASP.net code optimized as par modern standards Checklist for all pages Here is the list of and call a query / / sqlConn = New SqlClient.SqlConnection(STR_CONN) / / Catch ex As Exception / / 'Throw any Error that occurred / / Throw ex / / Finally / / 'Free Database connection objects / / sqlConn = Nothing / / End Try / / Leave Page are sure won't change at all or will be reused multiple times in the application. Make sure to have consistent cache keys to avoid any bugs. For simple pages which in session, then make it read only. / / / / '<%@ Page EnableSessionState = "ReadOnly" %> / / Use Option Strict On (VB .Net only) - Enabling Option Script restricts implicit type conversions, which helps avoid those annoying type conversion call is a function call that performs several tasks. you should try to design your application so that it doesn't rely on small, frequent calls that carry so much overhead becomes late bound and must perform type checking and conversions. Use Ajax - In performance critical application where there are frequent page loads, resort to Ajax. Use the SqlDataReader class - The SqlDataReader for in-process provider. The out-of-process solutions is useful if you scale your application across multiple processors or multiple computers. Use Stored Procedures - Stored procedures are pre-compiled and
faqs on masterpages Hi all, can anybody tell me the FAQs on Masterpages in asp.net. Thanks alot var Hi What are Master Pages in ASP.NET? or What is a Master Page? ASP.NET master pages allow you to create a consistent layout for the pages in your application. A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application. You can then create individual content pages that contain the content you want to display