开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜