How to call a method in aspx.cs from Class file?

How to call a method in aspx.cs from Class file?

Class.cs public int progressbar(int Total) { // all validation are done here. Based on each validaiton done Im displaying a progress bar message accordingly.. System.Web.UI.Page.UpdateProgress(msg,total); // How to call this file??????

I hope you understand the OOP concept. you have the method"progressbar" in Class.cs correct. And also its a non static method correct.

So if you want to call this method from other classes, you have to create instance and call the methodIf you want to call in the same class you can call directly. According to your requirement you can change the access modifier(public, private, internal etc.. ) and access the method.By NathanDirection is important than speed

If I understood your question correctly,you want to call UpdateProgress method from class.cs file which is a static method.In that case you can call the method by classname.methodname like classname.UpdateProgress() method.

HI,It seems you want to access presentation/GUI layer details from business layer.For this you need to create 2 seperate solutions viz 1 for WebPages and 2nd for DataClasses.Build a WebPages solution and add its lirary as a reference to DataClasses solution. Then you can easily create objects of required pages inside classes and call required functions.