asp.net get Strongly Typed from string
My error code:
string model = "Content";
Type stype = Type.GetType("mvc.Models." + model);
ViewPage<stype>开发者_JAVA技巧; vp = new ViewPage<stype>();
Of course it error when compiling, but it clearly show what i'm thinking. Can i do this?
That function GetType
needs an assembly-qualified name, not just the namespace as you have provided.
精彩评论