M
Mark Olbert
I have a TableAdapter declared in my website's App_Code directory (I'm using the declarative approach to design it).
If, in a web page from the site, I try to instantiate an instance of the TableAdapter dynamically:
protected void Page_Load(object sender, EventArgs e)
{
// check that we can find the Type of the TableAdapter
Type junk = typeof(page_infoTableAdapters.bd_contentTableAdapter);
// now try to create the Type
junk = Type.GetType("page_infoTableAdapters.bd_contentTableAdapter");
//!!!!! junk is null !!!!!!!!!!
// construction logic left out of example
I can't create the Type.
I've run into this before, and it normally means I need to fully-qualify the Type name with the name of the defining assembly. Only
the defining Assembly in this case is dynamically-created by Visual Studio...so what do I do?
- Mark
If, in a web page from the site, I try to instantiate an instance of the TableAdapter dynamically:
protected void Page_Load(object sender, EventArgs e)
{
// check that we can find the Type of the TableAdapter
Type junk = typeof(page_infoTableAdapters.bd_contentTableAdapter);
// now try to create the Type
junk = Type.GetType("page_infoTableAdapters.bd_contentTableAdapter");
//!!!!! junk is null !!!!!!!!!!
// construction logic left out of example
I can't create the Type.
I've run into this before, and it normally means I need to fully-qualify the Type name with the name of the defining assembly. Only
the defining Assembly in this case is dynamically-created by Visual Studio...so what do I do?
- Mark