A Folder Named App_Code is created by Visual Studio in our Application by Default.
We have to create a Public Class in that folder.
And then write our function which we want to replicate in multiple pages.
In the respective pages simply create the object of that public class, all the objects will be able to access
all the public functions of that class.
In the class (in App_code)
public class themainclass
public void tobereplicatedfuntion()
// Do Something you want to replicate
In Respective Pages (New object )
themainclass objthemainclass = new themainclass();
Lets See Working Example