Continuing from this question, I've got a form with all the Vehicles listed for a Person, the vehicle fields are editable, and they are now successfully posting back to my Save action.
Now I'd like to use UpdateModel to save the data, but I'm not sure how to construct it. Here's my Save action right now:
<ActionName("Edit"), AcceptVerb...
Because of the confusion between all the info that is out there about mvc from all the preview releases and the one official release I am very confused how to deal with viewusercontrols.
So once and for all, tell me how to implement this example:
I have a list of upcoming events that needs to be displayed on several pages of my website....
Hi I need to add photo support for my Application. Searching the site I found reference to nGallery. Any other. I use ASP.NET MVC.
Thanks
...
Hi,
I am just starting on ASP.NET MVC trying to understand the philosophy first. I think I am pretty clear on the roles played by the controller and the view but I am a little confused on the model part. Some sources say its the domain model, some say its the data model, some say its the objects that are bound to the view.
IMHO these a...
Hi,
Right now I am using mvc action's to handle ajax requests (not like I have another option...but just seems kinda wrong)
It just seems odd since there is no 'view' to the action.
...
I try to be as RESTful as possible in building applications but one thing that I'm never sure about is how to create a wizard-type work flow, be RESTful and concise.
Take, for example, a multi-page sign-up process.
Option 1: I can create a controller for each step and call new or edit when user gets to that step (or back to it). I ...
I've recently been asked to completely rewrite and redesign a web site and the owner of the company has stressed that he wants the site to be made with the latest and greatest technology available, but to avoid additional costs.
As of right now, I'm torn between looking into a CMS implementation and writing a new implementation with M...
I was deploying an ASP.NET MVC application last night, and found out that it is less work to deploy with IIS7 set to integrated mode. My question is what is the difference? And what are the implications or using one or the other?
...
I would like to have multiple buttons as images on this form:
<% Html.BeginForm("Create", "Foos", FormMethod.Post); %>
<!-- html form elements -->
<%=Html.SubmitImage("Button", "save-button.gif", new { alt = "Save" })%>
<% Html.EndForm(); %>
I am reading about Html.ActionImage but I don't see it in Microsoft.Web.Mvc, I guess...
Hello everybody,
I want to build something very similar to the "Ask Question" form in stackoverflow,
making some tag fields being added to my event model dynamically.
But I'm very new to MVC and I don't even imagine how to do that, can you provide me an
example or a tutorial?
Thank you, Felipe.
...
I am adding functionality to an ASP.Net webforms application and we've decided that new development will be done MVC with a view to move all functionality over eventually.
Obviously, MVC and WebForms play together rather nicely when it comes to accessing an MVC action via a URL. However, I'd like to display the MVC view within an existi...
Hi I am using ASP.NET MVC 1.0.
I use
ViewData["DeptID"] = new SelectList(DeptID, "ID", "Name", course.DeptID);
where I am passing the selected value DeptID as forth parameter, but it doesn't work. When I debug, then the above selection list is correct with the selected value.
I use
<%= Html.DropDownList("DeptID", (SelectList)View...
I have a page composed from multiple partial asp.net mvc views rendered dynamically.
How can I register in the header of the page some javascript files based on what is needed on on each partial view?
...
Hello,
I need to pass a full website url to my controller action, like this:
http://myweb/controller/action/http://blabla.com/dir2
how to create a new route for passing this parameter to action?
...
I have a method that returns an array (string[]) and I'm trying to pass this array of strings into an Action Link so that it will create a query string similar to:
/Controller/Action?str=val1&str=val2&str=val3...etc
But when I pass new { str = GetStringArray() } I get the following url:
/Controller/Action?str=System.String%5B%5D
So...
I've got an existing web site that monitors an SVN repository for changes and when there is a check in, the new web site is built using aspnet_compiler and then a diff of what is on the production site is sftp'd up to a production web server. The entire continuous integration process is built using cruisecontrol.net.
I've refactored the...
I have an scenario where a view in controller A posts its form to an action in controller B, the data is then validated in that action, and if anything fails validation, errors are added to the ModelState, and then the action, redirects back to controller A so that the validation messages can be populated.
The problem I'm having is that...
Hi folks,
i'm trying to make my site master page (views/shared/site.master) strongly typed.
eg. Inherits="TestProject.Mvc.Views.Shared.Site"
I can't seem to get this work. Once i make the site.master page strongly, typed, Visual Studio seems to 'loose' what <%= Html.XXX %> is. Also, the page throws an error when i try to display the de...
Hi folks,
I've got a standard ASP.NET MVC form post.
eg.
<% using (Html.BeginForm<CommentController>(c => c.Create())) { %>
..
<% } %>
(and in the controller)
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(Comment comment)
{ .. }
Now, how can i make it so that i IGNORE certain values, like the ID or CreatedOn properti...
I am trying to upload a file with ASP.NET MVC.
The following code work perfectly fine:
// Read in the image data.
byte[] binaryData = null;
HttpPostedFileBase uploadedFile = Request.Files["ImageFileName"];
if (uploadedFile != null &&
uploadedFile.ContentLength > 0)
{
binaryData = new byte[uploadedFile.ContentLength];
...