i dont know think im going stupid if there possibilities retrieve available views in asp.net mvc application.
what want is, user can enter search term, then, have show list of available views search term.
like :
public actionresult searchviews(string qry) { list<string>viewscol=new list<string>(); foreach(var vw in application.views) { if(vw.contains(qry) viewscol.add(vw.tostring()); } return partialview("_searchview",viewscol); }
this sketch i've made, want do.
so, if possible or not? or there way, list easily?
i want produce list of available views.
you need san physical files in views folder. can use code this:
var rootfolder = server.mappath("~/"); //recursivly files `rootfolder + "/views"`
Comments
Post a Comment