Using A Class In A Web Application?

Jun 8, 2009

new to classes so forgive me if this is a stupid question.I created an Employee Class. The class has all the important information about the employee. I have a Log In Page. When the user "Logs In" on the Log In page the Employee Class is used to use the UserName and PassWord entered on the Log In screen to collect all the information about the employee from the database and then it takes all that information and puts it into the Employee's Class properties. Once this is done the Application moves on to another web page. I need to be able to use the Employee Information through out the web application usages. What is the BEST WAY to use the employe class through out the applicaton?If you say that Caching is then can you give me an example of how to best Cache all the employee info so it can be used through out the application?

View 1 Replies


ADVERTISEMENT

C# - Calling A Method In A FACTORY Class When Application Is Closed / Disposed Without Using Application's Dispose() Method

Mar 28, 2012

I am indifferent if you are a VB.NET or C# or other .NET developer. I have a FACTORY class like the following:

[Code]...

View 2 Replies

IDE :: Excluding Forms To Convert A Window Forms Application To Class Library Application

Jan 16, 2012

I am not able to find the Exclude Command in VB 2010 Express. I have no idea which version of Visual Studio it is working with. I've got one 217MB VB 2010 Express file and many 2008 VB Express files with one of them measuring 31 MB. There many other SQL files and .Net Files.

View 4 Replies

Using Class In Web Application

Jun 8, 2009

I created an Employee Class. The class has all the important information about the employee. I have a Log In Page. When the user "Logs In" on the Log In page the Employee Class is used to use the Username and Password entered on the Log In screen to collect all the information about the employee from the database and then it takes all that information and puts it into the Employee's Class properties. Once this is done the Application moves on to another web page. I need to be able to use the Employee Information through out the web application usages. What is the best way to use the employe class through out the application? If you say that caching is then can you give me an example of how to best Cache all the employee info so it can be used through out the application?

View 2 Replies

Create An Application For A Class?

Sep 24, 2010

I'm trying to create an application for a class buy I'm having a hard time. I have started it but I don't really know how to implement the message box or calculations

Here is the question Here is the code I have so far

Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
' declare
Dim diameter As Decimal
diameter = CDec(txtDiameter.Text)

View 5 Replies

Use C# Class In Web Application (not In Website)?

Jul 16, 2010

I have a Class file which is written in C#, I want to use this class in my Web Application which solution is in vb.netf I place this C# class file either in root folder or App_Code folder, it does not allow me to create object, show syntax error, and intellesence is not working for this object.

View 8 Replies

Build A Useful Class And Implement It In An Application?

Apr 16, 2009

I am trying to build a class. I am having a difficult time conceptualizing how a class is built and how it works. I want to be able to build a USEFUL class and implement it in an application.

View 1 Replies

C# - Call .NET 4.0 WPF Class Library From 2.0 Application

Apr 8, 2011

I have an application written in .NET 4.0 that i compile into a DLL file. I want to be able to use this DLL file in a Windows Forms .NET 2.0 application. I don't need the application to really interact much, except just passing a couple string values to the 4.0 DLL. The DLL is pretty much a bunch of Windows which i converted to UserControls and i just need to be able to reference them to display the UserControls from the 2.0 application without having to use a different exe and having to package them separately.

What is the best way to do this? Because when i try to add the reference to the DLL to the 2.0 application, it gives me and error saying the DLL is built in a newer version of .NET so i can't do it that way. Is this where a COM object would come in?

View 2 Replies

Cannot Publish Application - Class Not Registered

Sep 8, 2010

I have developed an application in VS 2010 and now need to deploy it accross 10-15 PCs. I am publishing to a server where the other PCs will download it from. Only the PC I developed it on successfully installs the application. The others install it but it will not run. As a test, I installed it from the server on to the PC I developed it on, which worked fine. What may be causing it to install but not run on the other PCs? Also, I tried copying the visual studio solution to another PC and installing it locally but when I try to debug on any other machine, I get errors with the auto-generated code that deals with the controls that appear on my form.

The Errors are:
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Cannot get the file path for type library "00460180-9e5e-11d5-b7c8-b8269041dd57" version 1.3. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))Vb7TestApp
The referenced component 'AxDSOFramer' could not be found.
The referenced component 'DSOFramer' could not be found.
All references from the project on the other machine are present so this is not the issue. The form will also not load in design mode. instead I get the class not registered error.

View 3 Replies

Class Library Vs. Windows Application?

Sep 28, 2010

Here is code in a form that is called from the "main" form:Imports

System.Data.SqlClient
Imports
ClassObjects
Imports

[Code]...

frmOdyssey is the main form, from which frmSearch is called. After the above processing, I want to go BACK to frmOdyssey to process the FilFilterGrid sub on the Grid defined on frm Odyssey. I will be assigning a new DataSource for the Grid, which will be "selected down" by the strFilter. The above code works with no issue whatsoever in "Windows Application" mode. However, if I switch to "Class Library" mode, I get
an error on the last line of the last Sub, telling me "Reference to a non-shared member requires an object reference". If I uncomment the "Dim f As New frmOdyssey" line, and change the "frmOdyssey" to "f" on the next line, the error goes away, but then the process doesn't work, because the "select down" does not happen. I don't know why, except that "logically" I don't want a "new version" of the frmOdyssey. I want to update the existing form.

View 8 Replies

Enhanced Class Average Application?

Nov 4, 2011

Allow the user to enter a set of grades then calculate and display the total of the grades and the class average...simple enough. Create an application that enables the user to select a file in which to store grades. The application should allow the user to write any number of grades into that file and it should write one grade per line. (lost me there) Next, modify the application to allow the user to specify the location and name of a file containing grades. The application should read teh grades from the file, then display the total of the grades and the class average. My first question is on the Gui. I will have a calculate button that will display the grades entered, (how do I enter multiple grades at one time?) Or do I have the user input one grade at a time? When the calculate button is hit the number of grades entered should appear off to the side and an average score should appear. Is there a way to enter multiple grades at a time and are they entered and separated by a comma? Then there should be a button that stores this information. Should this button say save and retrieve files? Or should I have 2 buttons one to save and one to retrieve?

View 15 Replies

How To Create User Class For Application

Jun 22, 2010

I have a desktop application designed (VB.NET 2008 and SQL2005) which consists of user login and some access level for the users.The user class which i have classified are :

1. Administrator
2. Operator
3. Report User

This user has got a few access in my application. I have got stuck how to create a user class and give access level for this class and map those class to the users.

View 4 Replies

Integrating Java Class To Be Used In Application

Apr 13, 2012

I have been asked to create a project in vb.net which needs to integrate a java class created by Apple (Autoingestion.class) to pull sales records and so on.I found out a couple of questions here on stackoverflow but none of the answers given worked for me when trying to integrate this java class in my .net application.For example this question seemed to be what I really needed but when trying to compile this java class (I decompiled it first using Java Decompiler), it generally throws some errors.All I need is to use this class in my application to invoke a method.Does anyone know how to pull this out without much ninja-ing?

View 1 Replies

Share An Instance Of A Class Across The Application

Feb 8, 2012

I am creating a Windows application using VS 2008. This has a MDI Parent form that hosts multiple MDI children forms. I have a login form that authenticates the user and creates an instance of a user class. This has information such as UserID, Name etc. I would like this instance available to other windows. How would I implement this functionality?

View 2 Replies

'Class Not Registered' Error Comes While Debugging Application

Apr 21, 2010

i were working in Windows xp. last week I changed my OS to Windows 7.The project i have done in Vb.net(2008) . While running class not registered error comes. In another computer its works well. Why it comes.

View 1 Replies

.net - Create VB6 Application Using A Class In A DLL, Then Swap Out That DLL After Build?

Nov 17, 2011

so my question is relatively simple, can I create VB6 application that references a class in a dll, and then substitute that dll for another at runtime?Now my intial guess is... no chance in VB6.

So my thoughts turned to a VB.net interop dll. Could I do it in here, and then call the interop dll from the VB? but I'd be happy if someone knew differently.The only thing that I think would actually work would be DI in .Net, but I'm limited to .net 2, or 3.5 at a big push, so I dont know if that is possible.

I have a dll that a specific site uses, but we dont want to ship that out to everyone. Instead, we want to build a clone dll which just has the interfaces setup so that the VB6 build will complete.When it gets to the site that needs it, they want to replace the dummy dll, and drop in their version instead.

Note: We do use RegFreeCOM when its gets installed, so I do have the manifest files that I could play around with if needed.

View 2 Replies

Accesing Variable Application From Class Library

Nov 5, 2010

I'm trying to acces an application variable from my class library

i.e : my varaible contain the connection string initailized in application start method

Application("ConnectionString") = System.Configuration.ConfigurationManager.AppSettings("ConnectionString")

View 3 Replies

Class Library Getting Settings From Own App.config NOT The Application's?

Jun 2, 2009

I'm having trouble with my application settings and I'm wondering if anyone else has seen this.

I have a Librabry with a connection string. In the project for the library it has its own app.config:

<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="OBInfrastructure.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>

[Code]...

View 1 Replies

Convert Java Class To Vb 2008 Application?

Oct 29, 2009

I wrote a Java class that parses a bpel text file and then returns a count of the number of occurences of certain words. I wanted to convert it to VB2008 Forms application, so that its results are displayed in a TextBox and not on the console. The problem is that VB2008 lacks Scanner and StringTokenizer classes, which are in my current Java class. Am not sure how to get the same functionality (or better) in VB2008. Can someone out there help to convert this class.

[Code]...

View 1 Replies

Create A Class In A Windows Form Application?

Nov 2, 2009

creating a class.cs in a win form app? Here is some code I will use many times in my application...

Dim dat As System.DateTime
Dim day As Integer
day = dat.DayOfWeek

[Code].....

And also how to call this class in my forms to invoke this..

View 4 Replies

CryptoStream Class - Any Way To Save Key In Application Settings?

Aug 11, 2009

I am starting to use cryptostream class. I may be wrong, if you encrypt something, close the app, and then try to decrypt it, it will not be able to because a different key will be generated. Because I do need this functionality, I am wondering if it's possible to save the key in application settings and whether this is the right way to go?

View 2 Replies

Saving Matrix Class To Application Settings

Jul 27, 2011

In VB.net I have a matrix object which I'm trying to save away in application settings and Im not recovering the settings correctly.

[Code]...

View 3 Replies

Use C# Class In Program Project In Windows Application?

Feb 8, 2010

I wanna use the C# code file in VB.Net project Which is windows based application. But that C# class is not using in VB.NET application. How Can I perform this task.

View 4 Replies

Where Can Find FileUpload Class For Windows Application?

Jul 5, 2010

[code]It is for ASP.NET, i want to run it in Windows Application. I get an error says FileUpload reference doesn't exist or so. FileUpload resides in System.Web.UI.WebControls which doesn't belong to Winforms family.Please note that the file will be saved from desktop to remote file server (not ~/Uploads).

View 2 Replies

.net - Responding To Application-killing Events During Class Initialization?

Apr 6, 2009

When starting my application, I have a couple of classes which are required to read certain files in order to create a set of default data. The logical place (to me) to do this is in a Shared class constructor; the idea would be to throw a class-level event if the reading of the defaults file fails. Unfortunately, this does not work as attempting to access such an event, in order to attach a handler to it, fires the class constructor before the event has been attached. In a failing case, the constructor starts, fires the fail event, the constructor completes, and then the event handler is attached, after the event has fired.

The only other solution I can think of is to give the class a "typeInitialisedSuccessfully" boolean property and put a try/catch block around every call to construct an instance of the class, which seems unnecessarily kludgey to me. Can someone suggest a more elegant solution?

EDIT: Because this is a fundamental Class, used in one form or another across nearly all of our software tools, I would greatly prefer a solution that will notify future programmers that the type initialiser needs to be called, which is why I initially went towards the Shared Constructor as a solution.

View 1 Replies

Adding A Startup Form To A Class Library Application?

Mar 25, 2012

I have a project that was created as a class library application. It does not have any start up forms. How do I add and show a start up form to this project? Where does this application start since there is no Main Sub that I can find. I am using Visual Studio 2008 express.

View 2 Replies

C# - Class Design For Reports In .NET Application That Use A Conglomeration Of Data?

Jul 20, 2011

I can articulate my question well enough to get some clear and usable feedback here. I have reports (like paper reports) in my .NET application that have data bound to them. Typically the reports are a combination of many data elements across several busniess entites that may not all relate through an Inheritance hierarcy, etc. This makes it difficult to get all the needed data placed together to bind to the report.

So what I have done before are make 'Report' classes with data elements specific to supporting the reports they are bound to, and on the back end might be tied to specially created Stored Procedures that bring this data back (maybe several joins across many tables to get the right data needed). So if I was to make an analogy to the database world, I am essentially 'denormailizing' the data structure to get all of this data into a single class to make it easy to bind to the report.

However on the hard line OOP concepts and architecture design, one could say that a report is just another 'thing' to bind data to, and its class should not be designed just to suit the needs of data binding. In this thought process, I would actually need to make my class design be able to create the relationships needed to get all of the data together properly to still be bound, but not create any special 'Report' classes. I find this difficult to do sometimes. It is much easier to create these relationships in the back end stored procedures and then just output the resultset to be almost immediately bound to the report.

So what is the right way to solve this? If I create these specialized report classes with really no behavior, am I introducing an anti-pattern like the Anemic Domain Model?I could use some feedback, and please speak up if my question and scenarios did not make sense.

View 1 Replies

Create An Application Without Distributing A Referenced Class Library

Mar 1, 2011

I am using VB .NET 2003. I have created a user defined Class Library and created a reference to it in my application. Is there a way I can compile the application so that the Class Library DLL is embedded into the application? I would really like to be able to distribute the application without having to distribute the DLL as a second a file.

In other words, I made a New Class Library lets say called TEST. I developed a new class within this library called MYCLASS. I built the Library TEST and created TEST.DLL. I then made a new visual basic project called APP1. I added a reference to TEST.DLL. I now can use TEST.MYCLASS within my APP1 project. The application APP1.EXE will run in the test environment, but if I move it to the runtime environment it will give me an error "File or assembly name TEST or one of its dependencies was not found". To correct this error I can place TEST.DLL in the directory where APP1.EXE resides. I would prefer not to have to put TEST.DLL in the directory. Can I easily compile it into APP1?

View 15 Replies

Excel Instance Hangs In NET Class Project Application

Aug 7, 2009

I am writing a class project application that is loadable from within AutoCAD. This application generates an Excel workbook with extracted data. I am having a problem with Excel closing when finished. It seems the Excel instance hangs until my application is unloaded. I have found the section of code that seems to be causing to hang, but I'm not sure why its hanging to prevent it.

Below is a copy of my code for the class (top to bottom with exception of the FileExistValidation method... too many characters ). The code section that is commented out seems to be what is causing it to hang. If I uncomment that, Excel hangs, with it commented out, Excel closes out in the background.[code]...

View 10 Replies

Size Of The Class Affect The Memory Usage Of The Application?

Jan 27, 2010

Does a the size of the class affect the memory usage of the application? is it better to break big classes into smaller classes or just group them up into one big class.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved