c# - Returning different types from controller -


is there way return models client using ajax? in mvc controller i'm trying this;

mycontroller : controller {     public myobjecttype getnew()     {         return new myobjecttype();     } } 

this returns client "assemblname.myobjecttype". maybe there's method override don't know entire framework.

as patrick suggested return jsonresult. otherwise apicontroller serialize you.

mycontroller : apicontroller {     public myobjecttype getnew()     {         return new myobjecttype();     } } 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -