Click here to Skip to main content
15,936,349 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one partial view and view and again in view i need partial view .for partial view i defined action in controller and rendered it in view as
@{Html.RenderAction("Edit", "Home");}

but getting an error
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
Posted
Comments
SwarupDChavan 12-Mar-14 5:36am    
your question is not clear,can you specify clearly your problem

Hey,

Go through to the following article:

Partial View in MVC
 
Share this answer
 
Go thru my code for an example..it works


@{Html.RenderAction("GetGoogleAnalyticCode", "Home");}

SQL
public ActionResult GetGoogleAnalyticCode()
        {
            var settingvalue = (from s in _db.Settings
                                where s.SettingCode == "GA"
                                select s).FirstOrDefault();

            return PartialView(settingvalue);
        }


Partial View

@model BearBouquets.Models.Setting
@Html.Raw(HttpUtility.HtmlDecode(Model.SettingValue))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900