473,414 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

how to refer or call a class file in c# application

2
Please tell me how to call a (.cs) file in c# application.please provide me with an example.as i am trying to import that class file but i don 't know how to call it in my code behind file.please help me.
Jul 5 '07 #1
2 11351
dip_developer
648 Expert 512MB
Please tell me how to call a (.cs) file in c# application.please provide me with an example.as i am trying to import that class file but i don 't know how to call it in my code behind file.please help me.
you have that .cs file in your project...?? then simply create an object of that class and call its methods or properties or functions.What's your actual problem...???

Expand|Select|Wrap|Line Numbers
  1.  ' Suppose your class name is clsCustomer 
  2. Dim ObjclsCustomer As New clsCustomer
  3. 'now call a method like this
  4. ObjclsCustomer.GetCustomerDetail()
  5.  
Jul 5 '07 #2
Spanco
13
Please tell me how to call a (.cs) file in c# application.please provide me with an example.as i am trying to import that class file but i don 't know how to call it in my code behind file.please help me.
Step 1 .Create a .cs file (Hope u didnt get any problem)
Let us suppose that u create UtilityInfo.cs and add it to app Code folder

Step2.

At ur Page load event Create the instance of ur .cs file as
UtilityInfo utf =new UtilityInfo();

Step 3.

If u want to call any function from that cs file u just to write

utf.functionname(function parameter)


End

U have done it ,any prom shoot me a reply
Jul 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ethics | last post by:
Hi, I would like to use asp to call a java class file with arguments in methods for a web database application. May I know how to call the following class ? say : package wkflow; //all the...
3
by: Rajesh | last post by:
Hi, I am using iplanet webserver 4.1. I want to call a java class from ssjs file. But I am not getting the result. I have created a java class file and put it in the folder...
13
by: Bijoy Naick | last post by:
My project contains multiple aspx pages. Many of these pages have code-behind that use several helper functions. Instead of copying each helper function into each aspx page, I am thinking of...
3
by: Colin \(615498\) | last post by:
Why is the request and response properties not available from within a class file? Do I need to refer in same way to objects or classes from the calling page? Thanks, Colin.
5
by: Kuldeep | last post by:
Hello All, Framework: Visual Studio 2005 I have a class file in my project with a namespace nmArticles Now, I need to add this namespace into my article.aspx.cs page so that i can accesss the...
4
by: Avi | last post by:
Hi I am creating web application in which i want to assign by default values to the property which i had created my own. In that one of the property is of type color and i am unable to assign...
0
by: bharathreddy | last post by:
Here I will given an example on how to access the session, application and querystring variables in an .cs class file. Using System.Web.HttpContext class. 1) For accesing session variables :...
1
by: shakthi | last post by:
Hi I created an online Mobile application using .net 2.0 on server side and another offline application on mobile client using .net compact framework 2.0. I packaged my offline application to CAB...
2
by: Reggie | last post by:
Hi and TIA! I have a class file located in my root directory with all me web pages. I call/use the class and it works fine. I have no imports statements aspx or codebehind. My question is why? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.