how to create instance of class in asp.net
-
i downloaded few .cs files from internet include it in my vs project in app_code folder but when i try to create instance of it in my webform(importer.aspx.cs) i cant create it... i created my class (class1.cs) just for test it works fi9 .. i dont know what is going wrong ... plz help... thanks in advance.
-
i downloaded few .cs files from internet include it in my vs project in app_code folder but when i try to create instance of it in my webform(importer.aspx.cs) i cant create it... i created my class (class1.cs) just for test it works fi9 .. i dont know what is going wrong ... plz help... thanks in advance.
What is the access Specifier of that class ? You have to make it public, by default it is Internal.
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
i downloaded few .cs files from internet include it in my vs project in app_code folder but when i try to create instance of it in my webform(importer.aspx.cs) i cant create it... i created my class (class1.cs) just for test it works fi9 .. i dont know what is going wrong ... plz help... thanks in advance.
Make sure include name space name like NameSpacename.ClassName object =new NameSpacename.ClassName();
Parwej Ahamad ahamad.parwej@gmail.com
-
What is the access Specifier of that class ? You have to make it public, by default it is Internal.
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
thanks for the help.
-
Make sure include name space name like NameSpacename.ClassName object =new NameSpacename.ClassName();
Parwej Ahamad ahamad.parwej@gmail.com
thanks for the help....