473,221 Members | 2,076 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,221 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 11341
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: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.