Web Forms :: Web Project With User Controls And Class Only?
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
Similar Messages:
Sep 2, 2010
I'm trying to implement my own Membership provider. I don't want to dig in very details but only high level logic. And first I don't understand is how can I use the class User generated from database in my CustomMembershipProvider project?
I thought I shouldn't generate class User in my project which uses my custom provider because it just don't need any users. It's only for login/logout functionality which implements Membership provider, not project that uses it.
Then I thought that I should pass Connection String to my Membership provider in order to make UserEntity somehow and use it inside Membership provider. I have two separate project for Membership provider and for any else project using Membership.
How could I create and use ADO.NET Entity in CustomMembershipProvider project for User table which located in database in other project?
View 1 Replies
Nov 15, 2010
Is there any way to list all the class in my ASP.Net application(Including class in App_Code and Partial Class(aspx pages and asmx user controls)
View 3 Replies
Nov 16, 2010
I have a Website (File->New website) that uses Web User Controls extensively. Those controls are added dinamically - LoadControl - by reading a database and loading the control (ex: LoadControl(xpto.ascx) ). So, everytime I develop as new webusercontrol, I copy the ascx and vb file to the directory, add a line to the database and the webpage automatically load the control. Everything runs well.
Now I want to do the same with a Web Project (File->New project->Web project). I understand that all is compiled, so no code on the server. So, how can I mimic the same feature? Because I cannot simply copy the ascx file (without the vb file), or can I?
View 5 Replies
Nov 18, 2010
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.
View 6 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
Oct 14, 2010
I have defined the following control which serves as a wrapper for another control (simplified code):
[code]....
Can anyone provide any insight as to why it is failing in one environment, but not the others? Is this something related to configuration? The user control is hosted within a "SmartPart" style user control loader which is being used on a WSS 3.0 site in the DIT/SIT/UAT environments.
View 1 Replies
Aug 3, 2010
I've converted an old school website project to a web application project. I've always registered all of my user controls in the web configs for easier maintainability. After converting the project type. None of my user controls registered in my web config are recognized any longer. In the designer files, it looks like it's unable to resolve the actual control and it's defaulting to some <namespace>.<ControlName> that is totally wrong. I really don't want to have to go through and put Register tags in each page where a control is used. In my web config i'm registering my control as follows:
[Code]....
I'm using Visual Studio 2010. I've seen several article around the internet that allude to an issue back in VS2005. Scott Gu commented on several. I haven't seen anything specifically referring to issue in 2010. Has anyone else encountered this type of issue. I provided a really brief overview and i would be happy to go into more detail
View 1 Replies
Jan 21, 2011
I would like to know how to relate my shared class to my web User controls?? For example say I add a new class my project to run a game. How do I get infomation I need from my web controls to be used in my class.Say my user select easy for the difficult mode on a radio control. I want the class to be able to see that the user control has been set to easy or have the class modify values for my web controls
View 1 Replies
May 20, 2010
I'm working on an existing web project. All of the classes are in a seperate folder as vb files. I need to modify one to include a delete method. I think I can insert the delete method, my question is how do I update the project to include the modified class. I think that all of the classes are compiled into the project as a .dll which I don't know how to modify. I assume I need to modify the source vb file for the class and recompile?
View 5 Replies
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
Feb 2, 2010
I'm building an application where custom modules may be developed and "dropped in" to the system, where they can be picked up and utilized.
I'm building a forum module and have a user control to create a login/registration region. I plan on using a struct to store the user session data. However, i need this class structure to be shared between the forum module and the login/registration control.
Because the functionality is to be contained in the module's folder, i cant add any assemblies to the app_code folder.
How can i share a class or struct among two user controls?
View 6 Replies
Jun 10, 2010
We are using nested master page the master page is seperate class library project and all the other projects refer to them. We wanted to have a basepage class which load title, meta tags and keywords dynamically. It was working fine till it was inside the main project. We wanted the basepage class to be more generic and to have it reside in a single place. So i tried created a seperate class library project but i getting error "Could not load type" ..
How to have the basepage class outside the project?
View 3 Replies
Mar 14, 2011
I am trying to use some User Controls that are in a different project but I am not sure how to register them?
<%@ Register Src="<What to type here?>/Control1.ascx" TagName="Footer" TagPrefix="uct"%>
what type of project I have to pick when building one which will contain User Controls?
View 14 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
Jan 8, 2010
On the Timelog page, I want to put 2 dropdown list: 1 Manufacturing Project, 1 Engineer Project. However, users can choose either Manufacturing project dropdown or Engineer project dropdown (not both).
View 4 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
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
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
May 13, 2010
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.
View 3 Replies