asp.net-mvc

jQuery AJAX parameter not being passed to MVC

I'm a bit stuck on what is probably a common situation, but can't find much in the way of solutions. I'm passing a single int parameter to an MVC controller method, expecting a Json response back. Problem is, the parameter, while being populated at the client end, is not being recognised at the server end and is being interpreted as nu...

have anyone seen a good asp.net mvc event month calendar

I am migrated a site from asp to asp.net-mvc. I was using a third party event calendar asp code. does anyone know of a good asp.net mvc event calendar where i see a month view and it will show events in the date cells. ...

asp.net mvc url on .uk but not on .com ???

hi i have put this together this morning for a friend using MVC he has .com and .co.uk now my urls are /artwork/{project name} but on .com i dont get /artwork/{project name} in the address bar, even though it still works here is the url turncoatandrun dot co dot uk and dot com have never really noticed this before is it a bug ??...

ASP.NET MVC Turn "Keywords/Tokens" in View to Html Helper Code

In ASP.NET we have an editor that allows editors to type in content. We will like the functionality to enter some custom pre-built widgets/modules by simply typing in as an example: [Facebook-Comments] Then store that in the database. When we are rendering the Page, we would like to parse any occurrences of [Facebook-Comments] or any...

What Amazon S3 .NET Library is most useful and efficient?

There are two main open source .net Amazon S3 libraries. Three Sharp LitS3 I am currently using LitS3 in our MVC demo project, but there is some criticism about it. Has anyone here used both libraries so they can give an objective point of view. Below some sample calls using LitS3: On demo controller: private S3Service s3 = n...

SEO friendly CMS with user profile functionality

My company has a project to create a magazine style site with user profile functionality. We need: CMS for the article publishing. SEO Friendly urls. Commenting capability for the published articles. User profile system with limited social networking functionality (friends,friend messages,blog,account tweaking/personalization, article...

ASP.NET MVC - Passing a Model referencing a different assembly from a Controller to a View using C#

Given two assemblies: project.web project.lib The project.web assembly references project.lib which contains some business logic. A simple class from project.lib: public class Person { public string Name; } In project.web.Controllers: Using project.lib.models; public class PersonController : Controller { Person perso...

ASP.NET MVC Routing issues

Is there any tools or utilities to help in debugging ASP.NET MVC Routing issues? ...

How does the execption handling work with jquery and asp.net mvc?

Hi I been playing around with my code and I wanted to see what would happen if I did this. I load up my asp.net mvc page and then go to my mssql 2005 database and hit pause. I then click on a link that has a jquery ajax request. It goes to a method in my controller(lets say it is a JsonResult type) it has a ActionVerb of "Post" and Au...

asp.net mvc storing user data

Hi, how should I store user data in asp.net mvc? Let's say a user want to see 50 records per page. I wanted to save it in Session, but if I am doing it right, the Session resets every time a new controller is initialized. So where? A cookie? ...

MVC Data Annotation - Required Field not Working

Hi I have the following cod throughout my app but with just two fields it's not working. [Required] public string DevelopmentPM { get; set; } The following test runs and passes: [TestMethod] public void SiteConstruction_MODEL_DevelopmentPM_Is_Required() { //arrange var propertyInfo = typeof(SiteCon...

ASP.Net MVC requirements vs ASP.Net? (hosting question, plus LINQ-to-SQL question)

Hi everyone, I'm jumping into ASP.Net MVC and wanted to know how tough it's been for hosting providers to support it. One thing that I'd like to know is how I can port my local MVC app to a hosted provider if I'm using LINQ to SQL. I assume I have to move the dbml files over in some way? What else that's special in contrast to a regu...

asp.net mvc formsauthentication : when to do it manually ?

Can someone clarify when to use .SetAuthCookie and when to manually create a ticket and cookie in code. And then why would you need to have additional web config settings? ...

How should I write this Linq to Entity query?

I'm new to Linq to Entity stuff, so I don't know if what I'm doing is the best approach. When I do a query like this it compiles, but throws an error that it doesn't recognize the method GetItemSummaries. Looking it up, this seems to be because it doesn't like a custom method inside the query. return (from c in _entity.Category ...

ASP.NET MVC: Access controller instance from view

How can I access a controller instance from the view? E.g. I have a HomeController which then returns my Index view. Inside of that view I want to access the HomeController instance that created the view. How do I do that? ...

Asp.Net MVC routing diffrence in www.Mysite.com/Employee and www.Mysite.com/Employee/ while using JqGrid

I am using ASP.NEt MVC for one of my project. In this I have Employee controller which can be called by www.Mysite.com/Employee/ url. Also I have used JqGrid which uses followng to fetch data url: "GetGridData" While testing the same I found that If i type www.Mysite.com/Employee/ in browser a call is made to www.Mysite.co...

ASP.NET MVC: Verify that editing record is allowed (ownership)

I have a multi-user ASP.NET MVC application. The users are not supposed to see or do anything with each other's data. One of my controller actions is the obligatory POST to /Edit to edit a record (e.g. a contact). Now here is my problem: What if somebody forges a simple POST to /Edit (which automatically model-binds to my contact class...

What is a good design pattern for storing User Last Logon information?

You would think it would be a fairly straight-forward problem, but I'm struggling a bit with designing a feature to store the last logon date / time in an ASP.Net (MVC) application. My first instinct was to simply store the value in the database against the user's profile record and update the value to the current date/time on successfu...

Reusing ViewPage/HtmlHelper in seperate project in ASP.NET MVC using C#

I want to use the ViewPage/HtmlHelper class in the System.Web.Mvc namespace in a seperate project. I imported the relevant libraries and then tried this: using System.Web.Mvc; using System.Web.Mvc.Resources; using System.Web.Mvc.Html; public static class Display { public static string CheckBox() { ViewPage viewPage = n...

ASP.NET MVC: Get lowercase links (instead of Camel Case)

All my dynamically generated action links etc. are creating links like /Account/Setup. It looks strange. I'd like all my links to be lowercase (meaning /account/setup). Any way to do this? ...