Click here to Skip to main content
12,622,032 members (33,617 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# .NET MVC
Hi,

I have a controller for Product Search action and a corresponding View for it. I want to add that very Product Search View in my layout page so that it is accessible from everywhere in that application.I have been trying @Html.Render("_ProdSearch") but to no avail.So can anyone give me a detailed explanation as to how to do it. Thanks in advance.
Posted 12-Dec-12 1:54am
Shiv19387
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Shiv19 18-Dec-12 1:30am
   
Thanks rejeesh....That worked for me...
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Hello,

you can try
@Html.Partial("_PartialView", (ModelClass)View.Data)

that would work for you
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161128.1 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100