My project is completely built on asp.net with codebehind vb.net, is it possible to add a class library .cs file to my project. since it is based on c sharp will i be able to add it.
I have a custom gridview control which is a class library project.I want to be able to specify the css class for the gridview which I can do.But I also want to set a default css stylesheet to the gridview. So if I don't override it using the cssclass property it must get it's cssclass from the default stylesheet I have in my project.
How can I specify the default stylesheet. I have a stylesheet in a folder called "Styles" in my project.
Best way to describe my issue with vs 2010.create a new website. create the App_Code folder. create a new class in the folder. put the line "x" in the class declaration. hit compile. And the website will compile with no errors. It's not "seeing" this new class as being part of the project best I can tell.
I have list of class files, when i try to run the class files, it showing error as "a project with output type of class library cannot be started directly"
How to run the class file? How to create a dll file.
I have an ASP.NET web site project where I am using both VB.Net and C# class files. I have included separate sub folders in the App_Code directory for classes of each language.However, while I can successfully make use of a C# class in a VB class, I cannot do the opposite: use a a VB class in a C# class.
So, to illustrate, I might have two classes such as this:
Public Class VBTestClass Public Sub New() End Sub [code]....
I get an error that "the type or namespace "VBTestClass" could not be found". What am I missing here?
I have build a UserControl with separate code behind file.In that code behind file i have defined some public properties in the Partial class of user control that was automatically generated.Those properties will initialize some properties of controls that are used in the control.Now, in .aspx page i used this User Control and initialized the public properties through code behind of aspx page for dynamic contents.
I have created an App_Code folder in my MVC 2 project and added a C# Class to it. In my Controller I have added a using reference to the namespace my class is in so that i can create an instance. However when I run the project it says there is a build error and that the namespace could not be found or doesn't exist. I have added a namespace to the <pages><namespaces> part of the config file and that didn't fix it.
I have a bit of code I am reusing on a lot of my pages so decided to put this code into a Class and placed this class inside the App_Code directory. However when ever I try and create an instance of tis class so that I can use it's Methods etc I can't seem to get it to work, but if I create the class in the web root for the project it all wrks as expected.
I have a Web project in which I defined some methods to parse some webpages. I then save the retrieved data in a DB. Now I have run a lengthy operation(it may take 2 days) in which I continously parse webpage this way.
Can I use the webproject from a Windows project. If I try to add a refference to it it doesn't work. How should I do it? I have used until now an asp.net application, and done the calls to the parsing methods in the pageLoad event but after an hour or so the process stops.
I am developing a project using Visual Studio 2008 in C#, I have added the class library within the project and set up the relevant references and used the relevant using statements.
this is the error message:
Error 28 The type or namespace name 'Domain' does not exist in the namespace 'Forestry.SchoolLibrary' (are you missing an assembly reference?) C:ProjectsSchoolofForestry runkSourceSchoolAccountPresenterEditAccountPresenter.cs 26 40 School
these are my using statements:
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Data.Linq; using System.Text; using System.Xml; using Forestry.SchoolLibrary.Core.Domain; using Forestry.SchoolLibrary.Properties;
I have a referencing problem in my project. I have an ASP.NET application where pages are in multiple subfolders. All pages user controls are working fine.
I just want to reference a page class that is not in the root folder (in subfolder from the root folder) in my usercontrol code-behind file like this
if (Page is ar_default){ //}Where ar_default is my page class name as it is in folder name "ar"The user control is also in the same subfolder as the page being accessed.Wnen I use the same method with pages in the root folder, there is no problem at all and it is working although I notice that the classes still not appearing in the coding drop down menu but if I typed the name correctly it work.like so:if (Page is _default){ //}When using the same code with classes in subfolders it is giving this error:The type or namespace name 'ar_default' could not be found (are you missing a using directive or an assembly reference?)I'm not using any namespaces also.
I'm working on an internet application that has been set up as a web SITE project (I know...) in Visual Studio. I need to add additional features/functionality so have added a class library to the project and referred to it in the main web site project.
The issue now arises because I need to make use of core objects which live inside the App_Code directory in the web site project but this project doesn't appear to expose its DLL like web app/ code library projects do. Because of this I can't add a reference to the web site project in the class library to leverage the common site-wide code/objects.
I can't move the stuff out of App_Code so I'm looking for a way to refer to the website project dll from the new class library.
I use a separate project for my data layer and call one class within it clsData.cs. I'd like to know which page from the Presentation Layer (in another project within the solution) has referenced it from the clsData side, if that's possible.
I have a .net project whose part of the functionality is xls transformation. I now want to move that functionality away from the main project to a separate class library project.
I have no problems moving classes and accessing them, but part of the resources that I wanted to move were xslt files that define the transformations. Those files were originally located in the special asp.net folder: App_Data and then accessed using Server.MapPath(~/App_Data/XSLT/anXsltFile.xslt)
I wanted to move those files to that separate library as well, but not sure how to approach it, and how to access those files within the class library.
I've created class library project and added service reference to webservice. When i try to use webservice object am not able to access webservice methods.
myservice proxy=new myservice(); proxy.( no methods are coming)?
I have one C# windows class library type project which has a web reference whose settings are automatically added in to settings.settings file( Webservice name, type, scope, value).
I also have one separate ASP.net project which has let us as suppose, one page with a button. When I click this button, it calls a method of referred DLL of previous project and control goes there.
When in that project, when control goes in to location where I use this web reference, it tries to get the URL of web reference from settings file and raises an exception - 'The current configuration system does not support user-scoped settings'.
So, What is the way for me to call a c# project having web service in a asp.net project ? This is really a source stopper for our development.
In the development, it works nicely. Until I deported to production, I realise that the component that use those thing .. it just hang. I found that under BIN when it compiled dewaCorp.EUC.TelcoDB.Data.dll.config and open up that file and turn out nothing.
I am implementing a custom membership and role providers where I need to store all the role/membership information in the user's session.
I am implementing these custom providers inside a class library project (different from the website project) and need to access the session in them. The idea is to store the role/membership related information in the session after retrieving them for the first time from the database.
When I try to access the Session using System.Web.HttpContext.Current.Session
I get this as a null object (Object reference not set to an instance of an object.