asp.net-mvc

ASP.NET MVC posted file model binding when parameter is Model

Is there any way to get posted files (<input type="file" />) to take part in model binding in ASP.NET MVC without manually looking at the request context in a custom model binder, and without creating a separate action method which only takes a posted file as input? I would have thought that this would work: class MyModel { public Ht...

C# MVC: What are the real advantages to using Modelbinders?

Hello, I'm wondering what the real measurable advantage to using Modelbinders is? ...

Implementing .Net OpenId with ASP.Net MVC

The sample I downloaded from DotNetOpenId has different files than the MVC 1.0 application I get when I create a new application. I am new to MVC and openId, all the examples I have come across are very old. Can anyone point me to examples of implementing Openid with ASP.net MVC using DotNetOpenId. ...

How to make update panel in ASP.NET MVC

Hi Guys i make search about how to make update panel in MVC ,but , because it is new , i cannot find good samples regarding it.How can i implement this to MVC? Thanks ...

Can I really develop on ASP.NET MVC for free?

I'm currently developing a web app on Django/Python, and I consider moving to ASP.NET MVC. I downloaded the Visual Web Developer Express edition, read NerdDinner, and I'm ready to go. I will probably keep working on MySQL. One of the reasons I chose Django+MySQL in the first place was that it was free of charge. I'm bootstrapping a bus...

Reuse usercontrol in mail in asp.net mvc

Hi After a user purchases a product, a receipt is displayed. I need to also email this receipt to the customer (as html), and would like to reuse the view I already created. What is the best way to do that - and how? ...

Get Hidden Field Value from Active jquery accordion

I am using MVC with C#. I need to get the value from the hidden field of the active accordion in $(document).ready function. ...

Free ASP.NET MVC Hosting Site-- Is there Any?

I am looking for a free ASP.NET MVC hosting site. I know, I know, I might be coming up with a ridiculous request: MS servers cost money, and they are damn expensive, so I shouldn't be expected to get free ASP.NET hosting. The most is I can get best quality or most affordable hosting site, but free? Highly unlikely. Still, I want to as...

How do I bind a dictionary to a set of checkboxes using ASP.NET MVC?

My need is to 'bind' Dictionary<MyType, bool> to list of checkboxes in asp.net mvc. I'm confused about how to accomplish that. Could anyone help me? ...

ASP.Net MVC, Submit a form using javascript

I have a form on one of my ASP.Net MVC views that I created using the following code <% using (Html.BeginForm(null, null, FormMethod.Post)) Using this code I have no control as far as I am aware of setting the name of the form. I'm now trying to write a javascript function to submit the form, is this possible without knowing the form...

Creating an Ajax.ActionLink using javascript

I have a Todo List (an ASP.MVC UserControl) that for each row has the name of the task (that can be clicked to toggle between done/outstanding) and a delete button for removing the task - Both are created using Ajax.ActionLink to query the server. When creating a new row I need the task text and delete button to be ActionLinks, how woul...

MVC: Member and Member.Items.add(Item) doesn't get saved

The item doesn't get saved. Only member gets saved. When I debug [AcceptVerbs(HttpVerbs.Post)] the information is empty in the Item. Why? How should I solve this? When it goes to the post method of create, then the ITEM dosen't follow the member. and the ITEMS doesn't get saved. I debug the information and there are 0 Number items. ...

MVC View Textbox string input to TimeSpan to Time in Seconds Integer

I have got a LINQ to SQL entity class with an nullable int property called sTime which I am using to record number of seconds scheduled in for a task. e.g. database field 120000 I tried adding a property to the Task class but how do I initially set this property when I am using a LINQ to SQL entity. public TimeSpan ScheduledTimeSpan {g...

What is the Best Way to Organize a ASP.Net MVC Solution Using Dependency Injection?

I am early in development on a new ASP.Net MVC project and I using this project to get into DI. I'm pretty sure that I am going to go with Structure Map, but that isn't what I am asking about. What I am trying to figure out is how best to organize my solution. Do both the unit test project and the model get a configuration file to map th...

Update multiple div's from jQuery ajax response html

I have a page in a asp.net mvc shopping cart which allows you to enter a coupon and shows an order summary along with other page content. I would like to have an Update button which will validate the coupon code, report any errors and also update the order summary on the page via jQuery ajax. I know I could do this by making a form and ...

asp.net MVC checkbox headache!

I have seen lots of questions relating to this topic. I am using asp.net MVC 1.0 Problem area If I use <%= Html.CheckBox("Status", true) %> Then why It renders like <input checked="checked" id="Status" name="Status" type="checkbox" value="true" /><input name="Status" type="hidden" value="false" /> I put this in foreach loop and ...

Model View Presenter Interface question?

I need your help to understand MVP. I used a interface (IProductEditorView). If you look below you can see presentation layer: using System; using System.Collections.Generic; using System.Text; using MVPProject.BusinessLayer; namespace MVPProject.PresentationLayer { public interface IProductEditorView { int ProductID { ...

ASP.NET MVC + Charthing Controls

Hi Guys I can not seem to get the legend to apear in this chart. public ActionResult ServerityGraphicalSummaryReport() { Chart chart = new Chart(); chart.Height = 296; chart.Width = 412; chart.ImageType = ChartImageType.Png; chart.Palette = ChartColorPalette.Excel; chart.BackColor ...

ASP.NET MVC - Is it possible to have a MVC subproject in a FORMS rootproject?

I'm trying to find out if other people are able to do this. I've found the following question and answer (which refers to Scott Hanselmans post on mixing Forms and MVC) (http://stackoverflow.com/questions/541703/can-i-use-asp-net-mvc-together-with-regular-asp-net-web-forms). However this is not quite the same. Are you able to run a ....

How can I tell whether an asp:ContentPlaceHolder has been populated in MVC?

I have a master page with a content control. I want it to do something specific during load if a particular content place holder has been used. APageWithContent.aspx <asp:Content ContentPlaceHolderID="myContent" runat="server"> <div>hello world!</div> </asp:Content> MasterPage.aspx <asp:ContentPlaceHolder ID="myContent" runat="s...