473,387 Members | 1,585 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,387 software developers and data experts.

how to get methods of a class file from another aspx file in c#.net

1
Hi,

I wrote all common methods of my project are in a Class file named as "MyClass.cs". But I'm not able to access those methods from my aspx file. Both the class file & aspx file are in same project only.

But I can access those methods if the class file is inside the folder "App_Data".

Please guide me what I'm missing.

Thanks...
Nov 4 '08 #1
2 1531
nateraaaa
663 Expert 512MB
Do you only have one project in your solution? If so make sure you are using the public keyword on the methods in your class. If you solution contains more than one project you will need to add a project reference so that the class is accessible.

Nathan
Nov 4 '08 #2
Frinavale
9,735 Expert Mod 8TB
What version of Visual Studio are you using?


-Frinny
Nov 4 '08 #3

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

Similar topics

175
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be...
17
by: Picho | last post by:
Hi all, I popped up this question a while ago, and I thought it was worth checking again now... (maybe something has changed or something will change). I read this book about component...
1
by: | last post by:
Hi I have written a class (Vb.net) which supposed to write out page title, img URLs and other stuff. I can access the class methods and properties easily through the .vb page But how do I...
1
by: Davids | last post by:
ok this is basic but it really puzzles me. I have an .aspx page and within it a user control (for example mycontrol.aspx and it's code file mycontrol.aspx.cs). In the code for my base page I...
29
by: John Rivers | last post by:
Hello, What good reason there is for not allowing methods in ASPX pages I can't imagine, but here is how to get around that limitation: (START) <body MS_POSITIONING="FlowLayout"> <form...
6
by: John Rivers | last post by:
hi, here is how to do it and restore sanity to aspx html rendering: (please only reply with sensible architectural discussion - juan) put this at the end of an aspx file (or use an include at...
5
by: Daniel | last post by:
Hey guys I had a site in .net 1.1 and have just moved it to .net 2.0. A strange thing, in .net 1 when you create a project it puts it in a namespace, in 2.0 it doesn't? Also when in a...
9
by: J055 | last post by:
Hi I have a standard asp page which uses a MasterPage. The MasterPage contains a User control. How can I access a public method in the User control from my WebForm page? I can't move the method...
6
by: Steve Richter | last post by:
what with the website solution structure not having a namespace, how does the class of one website .aspx page class reference the class of another page in the same website? I have two pages....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.