Hi,
is it possible to use some kind of Multibinders, like this?
[Authorize]
[AcceptVerbs("POST")]
public ActionResult Edit([CustomBinder]MyObject obj)
{
///Do sth.
}
When i ALSO have configured a default binder like this:
protected void Application_Start()
{
log4net.Config.XmlConfigurator.Configure();
Regi...
Hi All
I am writing an ASP.Net MVC application. I have two entities - patients and treatments - which belong to large datasets with more than a thousand of each. The user needs to be able to easily create an association between the two - say add a treatment to a patient. I cannot use ajax or javascript. The list of treatments would ...
Hello All,
I am having an MVC application in that I am having an dropdownList on the add client page.
The user selects the sates in the dropdownlists.
On the edit Page,I want the same state selected which the user selected on the add client page please tell what shall I do.
Thank You
Ritz
...
ScottGu in this post link text shows how one can utilize EditorTemplates for things such as a Country DropDownList. My question is how can one pass a dynamic list of Countries to the EditorTemplate?
...
Hi,
I am using the DataAnnotations for error checking on my asp.net mvc app, I am also using strongly typed ViewModels too.
My error checking is working fine and is posting back to my view with error messages if a field is blank. However i have a MultiSelect / Listbox on my form which i need to remember it's state after an error.
At t...
<%using (Html.BeginForm("Upload", "Photos", new { id = Model.Gallery.GalleryID }, FormMethod.Post, new { @enctype = "multipart/form-data" }))
{%>
<p>
<span class="bold block">Photo 1:</span>
<input type="file" name="File1" class="block" />
<span class="bold block">File Name:</span>
...
I have a simple ASP.NET MVC application, like movie sample.
In the list.aspx page I have a grid, the grid has information from the database.
I can fill the grid by search criteria.
For example, I select product.cost < 60, I commit. The grid is filled with product, where product cost<60.
After I click to details to view details of one ...
Hi
I have a asp.net mvc page which renders a record from a database, it uses RenderPartial to call another view which renders an editable list of items related to that record.
My problem is I want a since save / submit button which not only saves changes made for that record but also changes made in the RenderPartial part... I have c...
Common scenario:
Hierachical domain model is being mapped to flat view model for presentation purposes.
I have a full validation setup in my domain and would like to avoid mapping view model to domain object just to find out that some property is invalid. Nor do I want to duplicate my validation logic in my view models.
What are so...
I am looking into creating a global ID system for all of our online products including our own company web site (we don't have any products that are public quite yet, but we are fairly close). If we were completely a .Net shop this wouldn't be much of an issue, but we have at least ASP.Net MVC and Ruby on Rails, and who knows what else w...
I'm trying to use a SelectList one of my views, and its just not populating correctly. It gets the proper number of entries (4), but they all read System.Web.Mvc.SelectListItem. I fired up the debugger on the code, and saw some strangeness going on. I must be doing something wrong, but I don't quite see what.
Code from the ViewMode...
By picking MVC for developing our new site, I find myself in the midst of "best practices" being developed around me in apparent real time. Two weeks ago, NerdDinner was my guide but with the development of MVC 2, even it seems outdated. It's an thrilling experience and I feel privileged to be in close contact with intelligent programmer...
I have a website that has categories for the products. I wanted to have the categories defined in a route pretty much like www.domain.com/categoryA.
Here's my problem what if I have category in my database that is 'Boxing Gloves' how do I handle the space in the category name?
...
I'm trying to find some best-practice examples (or any examples, actually) of using Machine.Specifications with the ASP.Net Entity Framework in an MVC project.
Not having had much experience with Machine.Specifications, I'm keen to see what sort of tests other people find useful and whether there are any gotchas for using the EF-generat...
Hi
I'm using Session per Request pattern. Transactions are managed automatically.
How can I easily handle StaleObjectStateException and show some specific view?
...
Hi,
I need a simple MVC framework, without jQuery extensions, hibernate, loggers, etc..
Only Model-View-Controller functions. Anyone have an idea where I can find one?
...
I am confused about making DropdownList in MVC. let's start with a simple case. In Address view I have a textbox for City, and a dropdown for State. My model Address table made by Linq to SQL has the following properties:
Public string City{get;set;}
Public string State{get;set;}
and another table with states.
in my controller i ma...
i have a bunch of code where i dynamically create dropdown boxes in javascript. To prepulate the list of dropdown items, i often have code similar to below where i "inject" in the array of data items from my model so i have <%= myHTMLhelper.ShowArray(Model.List ofItems %> code inside of a javascript function.
This works perfectly exce...
I do not want to spend a lot of time on something that does not have lot of support or no roadmap. Do we even have to worry about this view engines in the wake of vs2010/.Net 4.0?
...
Hello guys, I'm developing an application that uses Jquery to intercept my form submissions to make instead an Ajax Submission. So far so good! Everything works great.. If the client doesn't have JS enabled, the app keeps working flawless.
Well, today I created a new form but JQuery doesn't intercept the submission. It's true that I ch...