asp.net-mvc-2

Does NakedObjects.NET Integrate well with Editor Templates in MVC 2?

I just recently listened to a podcast on Naked Objects.NET, and one thing came immediately to mind. Does this framework support the use of Editor Templates? Meaning, it would be really great if I could put in an editor template for, say a datetime or something, and have that effect the entire site. Has anyone had any experience using ...

How to handle application shutdown in Quartz.Net

I have used Quartz.Net for queuing and sending emails from my application. I don't know how each scheduled job responds to application instance stopping, pausing or shutting down. The IJob interface has no method that can notify a running job about these events. My question is how can I handle these cases when they occur so that the job...

HttpStatusCodeResult in ASP.NET MVC 2

I have noticed that ASP.NET MVC 3 introduces a HttpStatusCodeResult action result. How do we do the equivalent in ASP.NET MVC 2? I want to return a 410 code. ...

Building a complex Object step by step. Where to save it?

Hi, I am using ASP.NET MVC. My requirement is to build a complex object (an object made of other object) through a step-by-step procedure like in a wizard. Every dependent object shall be build on it's step and shall be validated in it's step. For example public class ComplexObjectModel { public Object1 MyObject1 { get; set; } ...

ASP.NET MVC 2 Ajax Site Master

I started with a "new ASP.NET MVC 2 Web Application" template and created a few controllers. I want the links on my navigation menu (located in Site.Master) to load my 'content' div (which has all of the controller output) via AJAX and not perform an entire page refresh. I return PartialView() from TestController Index() method but this...

Cannot convert from 'System.DateTime' to 'System.Data.Linq.Binary' error

Hello everyone. In the program I'm currently working on, my table has a Create_Timestamp column, which I defined as timestamp. When I'm working with my data context and my form values in my controller on the HttpPost, I'm trying the following: NewsArticle article = new NewsArticle(); article.Create_Timestamp = System.DateTime.Now; T...

ASP.net MVC Membership Redirect Depending on Role

I have two types of roles [Admin, HelpDeskAdmin]. I have a single logon view(both users go to same link to login) and I want to check their role once logged in and redirect to their respective admin pages once authenticated. The code below doesn't identify the logged in user as being in the role the first time and reloads the logon pa...

By default, where is the membership data saved in Asp.Net MVC 2?

I create MVC application, run it and register. I cannot find the location the membership data saved. Where is it? Note: The application run on developer web server (cassini). ...

ASP.NET Intermittent lag before Application_BeginRequest()

I'm using ASP.NET MVC 2. When in Debug mode, there is a very consistent 5-10 second delay on every other request to the server before HttpApplication_BeginRequest() is hit in Global.asax It happens exactly every other request. In Release mode it is fast always but it's causing me problems testing things in Debug mode. I looked at the ca...

how to gzip content in asp.net MVC??

how to compress the output send by an asp.net mvc application?? ...

how to debug the asp.net view source files?

Hi, I want to enable the debugging the asp.net mvc 2 view source files. how to do that? ...

Can i pass a Model from view to controller without Form?

Hi guys i have difficulties of passing my model to controller> I wonder if this is a good practice or is it possible to do so. Here's what i want to achieve. <% foreach (DownloadFile file in Model){ %> <a href="<%= Url.Action("DownloadFile", new { File = file}) %>">click here to download</a> <% } >% I want to pass the DownloadF...

Custom routing within an area

Hi, i have an Area called Members and the following registered routes in the MembersAreaRegistration file: context.MapRoute( "Members_Profile", "Members/Profile/{id}", new { controller = "Profile", action = "Index", id = UrlParameter.Optional }, new string[] { "MyProject.Web.Mvc.Areas.Members.Controllers" } );...

value not getting from index view to controller method in asp.net mvc 2

Hi, As i showing the list of records in the index view in my asp.net mvc 2 + C# application. on the edit link, I am passing the string value which is the primary key in the db. so that I can access the respective records. but as i set the debugger at the controller in the Edit method , in parameter list I am not getting the value that I ...

Html.ActionLink() != Html.BeginForm() for URL prefix

Hi all! This is my setup: IIS6 on Windows Server 2003 iirf URL rewriter mapped .mvc extension to handle MVC pages (unchecked verify that file exists) no jolly catch-all handler IIRF rewrites with the following rule (there is more, but it all boils down to this one, as far as MVC is concerned): RewriteRule /(.*) /mvc.mvc/$1 [I,L] ...

MVC 2 custom data annotations on partial entity class property not registering validation error?

Hi All, I have a data entity class which I have added a property to using a partial class: [MetadataType(typeof(LocaleMetaData))] partial class Locale { public sealed class LocaleMetaData { [Required(AllowEmptyStrings = false, ErrorMessage = "A locale must have a descriptive ...

how to make dropdown in asp.net mvc as readonly ?

How can i make drop down as read only in the asp.net MVC Pattern version 2 after it filles? ...

load the view and controls as per posted mode in asp.net mvc 2

Hi, I am currently working in the asp.net mvc 2 with C#. it is new for me. Scenario is: I am showing the Edit page in the edit mode.this page have the dropodown control. It fills with the steps like Step1, step2 , step3, step4, step5. Ok? Now I want to load the Edit view page such a way that , If dropdown has selected as Step 3 then it ...

Import data to MySql from excelsheet to DB in MVC

Hi All I need a favor.I want to import data to MySql DB from excel sheet IN MVC.net.I didn't have any idea about this. Any help will be appreciated. ...

Perform customization in edit/add operation using telerik grid using the popup gridmode

I have an application in MVC in which i am using telerik grid to display the record.I am using the entity model for it. In case of edit and add operation i want to use the popup mode but i am not able to perform any customization:Hiding any column in edit mode,make some column uneditable, showing the proper validation message and maintai...