Hello,
I have a type:
public class IssueForm
{
Order Order {get; set;}
Item Item {get; set;}
Range Range {get; set;}
}
I created a custom model binder due to requirements on Order and Item, but Range could still use the Default Model Binder.
Is there a way from within my custom model binder to call the default model bind...
Hi all,
I have a problem with jqGrid and ASP.NET MVC framework.
Namely, jqGrid is working fine, until the point when I have in address bar URL like this:
http://[domain]/Controller/Action
It gives me JS error: "Object doesn't support this property or method".
When URL is like this:
http://[domain]/Controller
everything is working...
In my database I have tbales: categoreis and SubCategoreis. I would Like to create one Dropdownlist containg both of these. Something like:
Välj
<option value='1000' style='background-color:#dcdcc3;font-weight:bold;' id='cat1000' >
-- FORDON -- /// this is from Categoreis Table
</option>
<option value='1020' id='cat10...
Firstly, I've done a build, I've done a clean, I've done a rebuild, of both the project and the solution, so that's not the problem.
When I change my model for some reason the intellisense (in fact, it's not just the intellisense as if I do a build it comes up with an error as well) doesn't work. I have a model under ViewData.Model.Con...
In my Database I have Members Table and Pictures tables. A Member can have 1 to many Pictures. When Post has been made the member.Picture.Count = 0, I can't understand Why? and How should I solve this?
What Iam doing is:
public ActionResult Create()
{
Member member = new Member();
Picture pic = new Picture();
...
Consider the following code:
public ActionResult Edit(int id)
{
return View(db.Foos.Single(x => x.Id == id));
}
When user submits the changes, I would like to receive both original and current object values, such that the Update code can be:
Foo foo = db.Foos.Attach(current, original);
db.SubmitChanges();
I see two options:
1)...
This is part of the first build repoistory that sits on Microsoft MVC.
First call from the controller down for model.
public ActionResult Index()
{
var prog = yRepository.FindUpComingProgrammes();
return View(prog);
}
ASP ERROR:
Server Error in '/' Application.
-------------------------------...
I have a question about custom authorization in MVC.
I have a site that I want to limit access to certain pages, depending on their group membership. Now I have seen tons of examples on how to do this if there is a single admin group and a single user group, for example, but not any examples for a third level.
For example, only user...
I would like to be able to build a link to a controller action inside of my controller. I really want to do something like:
<%= Html.BuildUrlFromExpression<Controller>(x => x.ActionName(param)) %>
...except in the controller.
Any way to do this?
...
I have looked at a few data grids for an asp.net mvc app I am developing. I would like to
get some opinions on the different datagrids for asp.net mvc. I would like to know the pros/cons with the data grid, if you care to share.
...
I want to return a View() from an action, and the resulting response should have a content type of text/xml instead of the default text/html.
I have tried the following, with no success:
Response.Content = "text/xml";
return View();
I know that you can specify the content type by returning ContentResult, but that doesn't render my V...
I have an AccountController whose constructor takes an object derived from my custom IOpenIdAuthentication interface. By default, this is an OpenIdAuthenticationService object that wraps an OpenIdRelyingParty. The interface looks like this:
public interface IOpenIdAuthentication {
IAuthenticationResponse Response { get; }
IAuthe...
What the appropriate way to do this?
ViewData["PreviousPage"]=Request.UrlReferrer.PathAndQuery;
this doesnt work if directly accessing.
EDIT: I did a null check on Request.UrlReferrer, seems to be fine (?)
...
Is there a way to override the maximum request size for a specific ASP.NET/ASP.NET MVC page, without also changing it for the rest of the website via Web.config?
...
I have a property on my BaseController called DataContext that holds my LINQ to SQL data context (or fake context for testing). When using a parameterless constructor (in other words, when a request to ASP.NET MVC is made), a new instance of my LINQ to SQL data context is assigned to the property:
public class BaseController : Controlle...
I'm trying to use donut-caching on the Site.Master page for things like the User Login and Shopping Cart, so that we can put OutputCache on some of the more resource intensive pages in our app.
Currently, I'm using the tag and then writing out the html from the static method in the code behind.
<asp:Substitution ID="Substitutio...
I created a new ASP.NET MVC project and implemented a site authorization filter.
When I map the routes to the {controller}/{action} pair, I pass a role = "SomeRole" default to the route.
It works perfectly if I go through the full url (http://localhost/somecontroller/someaction) and I specified the full route
[ MapRoute("SomeAction",...
returning HTML in my json array, what things do I have to escape for?
...
When linq to entities was released, everybody say that linq to sql is dead.
But most books and sample projects by microsoft employees, use mvc+linq to sql.
There is some reason for that? The linq to sql seems better for POCO, would it?
...
I have a sql server table with 2 fields, ID (primary key) and Name (unique key).
I'm using linq to sql to produce model objects for asp.net MVC from this table.
To perform the model validation I've implemented IDateErrorInfo in a partial class
public partial class Company : IDataErrorInfo
{
private Dictionary<string, string> _error...