asp.net mvc 2 - How to write an action method in a controller to reference a partial view? -


i have written action method in reservationcontroller class. code work should move getcoretab file reservation folder. not want since give path of getcoretab file in reservationcontroller class. want give path, such code getcoretab method work reservation controller class.

structure:

enter image description here

code:

        public partialviewresult getcoretab()     {         return partialview("tabs/getcoretab");     } 

html:

<a href="<%= url.action("getcoretab", "reservation") %>" class="a">                 <b>                     <div id="home" class="menu">                     </div>                 </b>             </a> 

any ideas?

thanks

you specify path partial:

public partialviewresult getcoretab() {     return partialview("~/views/shared/tabs/getcoretab.ascx"); } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -