How To Create The Class In The Web Root For The Project
Mar 20, 2010
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.
View 12 Replies
Similar Messages:
Jul 17, 2010
I get this error while trying to create a class lib project Name 'HttpContext' is not declared.i included Imports System.Web.
View 1 Replies
Mar 5, 2011
I am using dotlesscss for my css and I remember how to use that but what I am forgetting is how to get the root project path so that I can generate the full file path to my .less file to get for the less engine to parse. How do I get the project root path so that I can generate the path for my less files?
View 1 Replies
Dec 12, 2010
i added a class to the root of my project and in it i have created an override for the html editor
[Code]....
the thing is that i can't (don't know how to) use it in my .aspx page. i tried adding a "Register Assembly..." but i didn't got it to work.
View 5 Replies
Jan 5, 2010
I am working with two different web sites in asp.net. In the first project i upload some images to a specific folder under the project root and save just the filename in the database, now i am trying to display this images at some page of the second project I know the filename from the database and the image folder as absolute pat but I have not been able to display the image, even thought when looking in firebug the image src is correct src="D:/MyFolder/image.jpg" the image does not display, probably because it is not pointing in the right directory. I have also tried using Server.MapPath and then my D location but still no success.
View 3 Replies
May 27, 2010
i have a website project. i have 2 folders within default.aspx. in the root i have no default.aspx.
How can i redirect users when they are in Role "Folder1" to the ../Folder1/default.aspx
and user in Role "Folder2" to the .../Folder2/default.aspx
View 2 Replies
May 23, 2010
Using Visual Studio 2005
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.
View 5 Replies
Aug 2, 2010
It is possible to create a Visual Studio Web Setup Project that deploy my files outside wwwroot folder and set IIS virtual directory to this folder?
View 1 Replies
Mar 11, 2010
I'm trying create unit testing for an existing website project (not web application project). I cannot access my under test classes unless I use accessor. However, if I use accessor, I have problem to initiate an object with passing arguments. I only want to create unit tetsing for App_Code. After searching web, and I found that I'd better to create a web application project using my current existing website project. From solution explorer, add new project ->using existing website. My questions is: what impact will have for my current website to create the new project? Should I just convert my current website to web application? If do that, will it cuase problems on my website? I am new on asp.net, still learning..
View 1 Replies
Nov 18, 2010
i need to create xml document from SQL with the root elements & the sub elements
how do i do it uisng vs2005
i do have a xsd. the generated xml shld be validated with the given xsd
View 3 Replies
Jul 23, 2010
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?
View 2 Replies
May 17, 2010
I have written code to upload file through httpweb request.No I want to save this file outside the root folder on server.
View 2 Replies
Jan 27, 2010
I ran into the following issue when trying to run a test website on IIS 7.5 (Windows Server 2008 R2 DatacenterEdition). The web-app is configured to run with framework version 3.5 in a .Net 2.0 app pool. Also the framework 4.0 beta 2 is installed on the server. The application named 'TestPfade' is located under the website's root named 'Default'. It is not only a virtual directory but defined as an application. The folder structure looks like this: The markup of the sole document reads as follows:
[Code]....
When viewed in a browser the image gets shown because the given relative path is correctly resolved to 'images/Lighthouse.jpg' but the paths to the ajax-framework resources also include the application's root folder and therefor aren't found: 'src="/TestPfade/WebResource.axd?d=1bX...' Here is the complete html-source generated:
[Code]....
View 9 Replies
Feb 11, 2011
I am using iis 5.1 in which we have only only one default website, I have two projects v2 and v3 my website points to v2 projects and have some folders images, styles etc now i have a virtual directory under this website that is hosting project v3 and having the same folder hierarchy as v2 in the home page of the both projects i have img src="imagesedlogo.gif" alt="logo"/> but this shows the same image that is in the v2 directory, How can i show different images for both projects. using "" get the root of the web site but how can i get the root of virtual directory under that website
View 2 Replies
Sep 17, 2010
How can you request the root default.aspx without specifying it in the url for your root application?e.g. ttp://localhost/MyApp/ instead of http://localhost/MyApp/Default.aspxshould be able to do bothI'm not sure if this is a setting in IIS 7.5 for the application or what.
View 3 Replies
Jul 14, 2010
I am writing a programming using Tree View. I have created the Tree View object and have added a node for the root called Favorites. I want the user to be able to enter a value in a text box and once clicking on an add folder button, an event fires that takes the text that was entered in the textbox and creates a new node under the root node of favorites.
I am having a problem with my program in that the user is not able to click on the Favorites root note in order to create another node underneath of it. Favorites is simply displaying on the screen, but they cannot click on it to select it. What do I need to add so that the user can select the node to which they want to add a child node to?
View 6 Replies
Mar 26, 2011
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.
View 1 Replies
Jul 25, 2010
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.
View 2 Replies
Feb 19, 2011
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.
View 1 Replies
Jun 14, 2010
how can I use this in class project c#
Server.HtmlEncode ?
View 1 Replies
Jan 29, 2010
I have a created a solution using visual studio 2008 and added a new project namely "test".
In this project i added a folder namely "code" and in this folder i added a class file "class1.vb".
But i am facinng problem when i am going to create object of that class1.vb in default.aspx.vb page
i want to access my class1.vb methods.
View 4 Replies
May 27, 2010
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;
View 2 Replies
Jan 28, 2010
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.
View 4 Replies
Jun 13, 2010
I am unable to use request and response.redirect in class project in c# ! am I missing a refference ??
View 13 Replies
Oct 7, 2010
i created a web project and add some class and user controls (ASCX files). then i build it and from the generated DLL file.
i add it (DLL file) to my actual web application and called the classes that i have made everthing works fine.
so the problem is the web user control, i don't know how can i use it. i know that it must be place to the aspx file but how?
View 2 Replies