Tagged Questions
14
votes
1answer
4k views
Using custom VirtualPathProvider to load embedded resource Partial Views
I wrote custom VirtualFile and VirtualPathProvider implementations that are successfully obtaining embedded resources that are Partial Views.
However, when I attempt to render them it produces this ...
20
votes
4answers
8k views
Injecting content into specific sections from a partial view ASP.NET MVC 3 with Razor View Engine
I have following section defined on my _Layout.cshtml
@RenderSection("Scripts", false)
I can easily use it from a view as follows :
@section Scripts {
@*Stuff comes here*@
}
What I am ...
10
votes
2answers
19k views
how i can render Partial views in asp.net mvc 3
I have some data in ViewData.Model, and in my views I want to write a partial view and to pass their current model I have in my page.
How I can pass their current ViewData.Model and render them ...
9
votes
3answers
12k views
How to pass parameters to a partial view in ASP.NET MVC?
Suppose that I have this partial view:
Your name is <strong>@firstName @lastName</strong>
which is accessible through a child only action like:
[ChildActionOnly]
public ActionResult ...
4
votes
2answers
2k views
MVC3 Razor: Is it Possible to Render a Legacy ASCX?
With the Razor view engine in MVC3,
Is it possible to render a legacy ascx?
I was expecting to be able to do something like:
@Html.RenderPartial("Footer.ascx")
2
votes
3answers
3k views
MVC3 Partial Views
Still Learning MVC3, EF. For now I am connecting to MySql but I believe that will not be relevant. For simplicity, I decided to use one database for my test application and I have included a category ...
18
votes
6answers
1k views
Render MVC PartialView into SignalR response
I would like to render a PartialView to an HTML string so I can return it to a SignalR ajax request.
Something like:
SignalR Hub (mySignalHub.cs)
public class mySignalRHub: Hub
{
public ...
8
votes
4answers
16k views
Render Partial View from other controller
Is there a way to render inside my view of controller A a partial view from other controller B?
Edit: I wrote a partial view that is good for only two controllers and I don't want to copy it to ...
4
votes
3answers
5k views
Disable caching on a partial view in MVC 3
I have an issue with a partial View being cached when it shouldn't be. This partial View is used to display the Logon/Logoff on a page. It uses the simple code below to figure out which link to ...
1
vote
2answers
8k views
ASP.NET MVC 3 Partial View dynamically rendered and linked from dynamic list in view
In my MVC 3 application, I will have a view that will contain a partial view. The view itself will have a list of dynamically generated links. The link has to cause the partial view to render detailed ...
5
votes
1answer
4k views
Asp:net MVC 3: @Html.EditorFor a subcollection of my model in a template?
I've been stuck a long time to edit a subcollection of my model, the collection of the model was coming null.
I finally found a solution, but I find it a little dirty:
First my tests datas:
Model ...
4
votes
1answer
2k views
MVC 3 Razor Form Post w/ Multiple Strongly Typed Partial Views Not Binding
I'm curious about whether the approach of using multiple strongly typed partials within a form that posts back to the partial containing View is the right MVC approach to doing things. The main View ...
3
votes
3answers
22k views
Jquery Modal Dialog displaying MVC3 partial view - works first click only
public ActionResult MeanQ(int id)
{
Access access= db.Access.Find(id);
return PartialView("_MeanQPartial", access);
}
The partial view thats being rendered in the above code is ...
1
vote
3answers
5k views
ASP.Net MVC 3 RC2, Partial Views Form Handling
After years of Web Forms development I've decided to give MVC a go. I've been able to work through most of the other stumbling blocks, but I'm kind of stuck on this one.
In Web Forms I would create ...
5
votes
1answer
2k views
How to load views from a Class Library project?
I tried to create a VirtualPathProvider and set the view as an embedded resource.
class AssemblyResourceVirtualFile : VirtualFile
{
string path;
public AssemblyResourceVirtualFile(string ...