asp.net-mvc

ASP.NET MVC Ajax Coment Add - Rebind comments section

I am using Ajax.BeginForm to post comment. How should I update the Comments section area to incorporate this new comment? I am displaying comments on the page using the typical "foreach(Comment comment in Model.Comments)" ...

ASP.NET MVC - Unable to print ASP.NET Charting control on server.

Trying to print an ASP.NET Charting control behind the scenes in my web app. I think it is a permissions issue with the printer as everything is ok up until the point where my code calls: chart.Printing.Print(false); bool finished = false; while (!finished) { finished = File.Exists(settings.GetValue("statusfile")); // file which ind...

asp.net assemblies processing incoming email - what's possible?

I've done plenty of outbound email processing via both SQLServer and .net web apps. But in terms of what I can do to respond to incoming email I'm starting from scratch and looking for an overview of how an asp.net (preferably examples specific to mvc apps) assembly can use input from inbound email using resources native to IIS7/winserve...

Unable to create objet context

I'm getting the Unable to create object context error when using Entity framework in ASP.NET MVC. Background Every time I POST to the controller I'm not getting a response back. I tried going directly to the method of the controller /Data/GetAll, and receive this error: Error The specified named connection is either not found in...

Flat vs Nested ViewModel Classes in ASP.NET MVC

I'm looking for some opinions on two different approaches to ViewModel definition I have a Company class public class Company { public string Name { get; set; } public int CountryID { get; set; } } For the Create and Edit views I need a list of Countries to populate a DropDownList for CountryID selection. I can see two broad ...

How to post to Facebook user's profile?

On my site, user's post goods for sale (similar to Craigslis). I want to create the capability for user's to have it post to their facebook profile automatically from my site. The scenario I'm imagining is this. User creates an account on my site. In their profile, they allow my site to post to their facebook profile. From then on, any...

Redirect to another website from Controller

how to redirect from a action to an external web site like paypal ...

In MVC 2, How would you determine a file exists at the server using C#?

I know you can do this: if( System.IO.File.Exists( @"C:\INetPub\MVCWebsite\Content\Images\image.jpg") ) { ... } and you can do this to reference files in MVC: Url.Content("~/Content/Images/image.jpg") So is there a way to relatively check that "~/Content/Images/image.jpg" exists (in MVC?)? ...

Complex Strongly-Typed Object + Default ModelBinder

Hi everyone, I have the following complex model: Category - has -> List which has -> List I am trying to make a create action where I can pull all the existing categories and insert for each category one List all together, including the sub items. For example: -Cat1 -- NewItemGroup1 --- NewItem1 --- NewItem2 --- NewItem3 --- ...

ASP.NET MVC - delete a user in default account system?

How does one delete a user from the system in ASP.NET MVC? Is there any facility built in that I'm just not seeing? I have a Customers controller which ties into the default Account controller well for the most part but when it comes to deleting them, deleting from the Customers table isn't enough as the user name is now effectively "r...

What is the vantage of asp.net mvc?

What is the vantage of asp.net mvc? How can I migrate from asp.net to asp.net mvc? ...

Trouble deploying ASP.NET MVC project to a hosting provider. 404 errors

I published my VS2008 ASP.NET MVC 1.0 project to a local folder, then FTPed it to a virtual directory on my host (GoDaddy). I attempted to run and it complained that System.Web.Mvc.dll is missing, so I copied that. After that I get a 404. Now I know that it gets to my HomeController.Index method, because it does a RedirectToAction. T...

how to retrive value from textbox in asp.net mvc2

I am working on chart project in asp.net mvc so any one can kindly tell me how to retrive values from the text boxes to apply to the series of the chart? ...

Generate simple web site GUI using .net

I have a couple of super simple databases. Basically they all consist of single tables that saves tracking/logging data etc. Now I want to list this data but I'd like to find a solution that's applicable to all the different tables in all the databses. SO basically I'm looking for some way/some pattern of pointing a solution to a databa...

User field of ELMAH error logs [ASP.NET MVC]

I was able to setup EMLAH to log my ASP.NET MVC Application Errors. But log entries are missing User field. I want to add username that is stored in Session to User field. How can I achieve this? I'm beginner, so sorry if this question is too trivial. Thanks in advance. ...

how to apply image as background in asp.net mvc?

I am Displaying all the images from database to image tag no ai have problem in after seleting one image that image should be apply as background. What is javascript for writting this? thank you.... ...

looking for some books about asp.mvc and nhibernate

Hi i'm looking for some books about asp.net and nhibernate. Any suggest? thanks ...

ASP.Net MVC image upload failing in Google Chrome.

I have an image upload form <% using (Html.BeginForm("PictureValidateAndSave", "UserGallery", new {}, FormMethod.Post, new { enctype = "multipart/form-data"})) { %> <table> <tr> <td> Album Name: </td> <td> <%= Html.DropDownList("albumList") %></td> </tr> <tr> <td> File Loc...

Directory.Delete(path, true) always gives error - ASP.NET 3.5 MVC

Hi, I'm using MVC ASP.NET 3.5 and I'm trying to delete a folder with all files within using standard .NET method that I've always used in .NET 2.0. I found this but the first answer doesn't seem to work. I've tried this one try { Directory.Delete(path, true); } catch (IOException) { Thread.Sleep(0); Directory.Delete(path, t...

Has anyone actually encountered a calendar widget that was better than just text input for DOB?

Im learning asp.net mvc and have been investigating jquery and the like. As yet I havent found a calendar that is actually any good for inputting a date of birth. It often involves masses of scrolling to find the correct year! It is often easier/quicker to just type it in. Just wondering if anyone had found any examples of good calenda...