Page Inheritance
-
Hi I writen a function in 1 Page i have to call that function in every page How can i call the function in every page OR some pages asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
-
Hi I writen a function in 1 Page i have to call that function in every page How can i call the function in every page OR some pages asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
Hai, I will be better to keep the method in a seperate class file. Eg:
classs Utilities
{
public static void doCommonJob()
{
}
}or create a custom page class with this function implemnted. Then make all pages you need to call this fucntion inherit from this class eg:
classs MyBasePage : Page
{
public void doCommonJob()
{
}
}classs MyPage : MyBasePage{}
-
Hi I writen a function in 1 Page i have to call that function in every page How can i call the function in every page OR some pages asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
Hello.. Place the common function code in a class file and declare the function as STATIC. By this you can easily access that function by Class Name... like public class TestCls { Public static SomeFunc() {// some code} } ........................ Now to access it in any page you can use TestCls.SomeFunc(); i.e no need to create the object of that class. regards _mubashir
-
Hello.. Place the common function code in a class file and declare the function as STATIC. By this you can easily access that function by Class Name... like public class TestCls { Public static SomeFunc() {// some code} } ........................ Now to access it in any page you can use TestCls.SomeFunc(); i.e no need to create the object of that class. regards _mubashir
-
Hi I writen a function in 1 Page i have to call that function in every page How can i call the function in every page OR some pages asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf