我试图理解如何使用:
@Html.Action("GetOptions", )
我谨向我的控制者发出呼吁,并通过参数:
pk = "00" and rk = "00"
一些人可以解释我如何能够与Html一起这样做。 行动
我试图理解如何使用:
@Html.Action("GetOptions", )
我谨向我的控制者发出呼吁,并通过参数:
pk = "00" and rk = "00"
一些人可以解释我如何能够与Html一起这样做。 行动
http://msdn.microsoft.com/en-us/library/ee703457.aspx” rel=“noretinger”Action方法;它作了很好的解释。 对您来说,这应当做到:
@Html.Action("GetOptions", new { pk="00", rk="00" });
<控制代码>
@Html.Action("GetOptions", "ControllerName", new { pk="00", rk="00" });
first, create a class to hold your parameters:
public class PkRk {
public int pk { get; set; }
public int rk { get; set; }
}
然后使用<代码>Html.Action通过参数:
Html.Action("PkRkAction", new { pkrk = new PkRk { pk=400, rk=500} })
主计长办公室
public ActionResult PkRkAction(PkRk pkrk) {
return PartialView(pkrk);
}
Another case is http redirection. If your page redirects http requests to https, then may be your partial view tries to redirect by itself.
It causes same problem again. For this problem, you can reorganize your .net error pages or iis error pages configuration.
仅能确保你将申请改写为正确错误,或找不到网页,并确保这一错误页含有不成问题的部分。 如果你的网页仅支持https,如果不使用https,则不会提出错误页数的要求,如果错误的页数包含部分内容,那部分内容试图从请求的圆顶上调取方向,则会造成问题。
I am trying to make a WebForms project and ASP.NET MVC per this question. One of the things I ve done to make that happen is that I added a namespaces node to the WebForms web.config: <pages ...
I m using ASP.NET MVC and Entity Framework. I m going to pass a complex entity to the client side and allow the user to modify it, and post it back to the controller. But I don t know how to do that ...
What I want to reach is a way to add a script and style placeholder in my master. They will include my initial site.css and jquery.js files. Each haml page or partial can then add their own required ...
let s say we have something like this public class Person { public string Name {get; set;} public Country Country {get; set;} } public class PersonViewModel { public Person Person {get; ...
I started out this morning working with my ASP.NET MVC project like normal and everything worked. I added a new class and some functions and it still worked. Then, all of a sudden, while I was ...
I have an BLL that does validation on user input then inserts a parent(PorEO) and then inserts children(PorBoxEO). So there are two calls to the same InsertJCDC. One like this=>InsertJCDC(fakePor)...
So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...
i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...