In VS2005 webapplications how can we create an instance of a class in a page (Eg :deafult3.aspx) from another page (deafult2.aspx).In the earliar VS2003 we could create an instace of a page
Eg for page . Webapplication2.aspx
Webapplication2 objpage=new Webapplication2();
but here in VS2005 we can't create like this.
OR
How can we Import a page from another page in VS 2005 ,c#.
how it s possible ???
Hope u respond sooon.
thanks
Arunlal
Loading
arunlal aPosted Jul 4, 2006, 12:02 AM
source code
-----------
page1.aspx
------------
Public class myclass
{
public string test()
{
return "test return";
}
}
Page2.aspx
----------
in the code behind iam not getting the class "myclass" for creating instance of the class.
hope u respond soon.
Edward LegaspiPosted Jul 3, 2006, 2:23 AM
MyClass myClass = new MyClass(parameters).
Or if the class resides on another project add a reference to that project first