asp.net-mvc

asp.net mvc Error Handling Helper classes

Hello friends, Ineed to write the Error Handler Helper classes for my asp.net mvc project.. can anybody give me the code how to write and where to write this Helper classes in my appliction? and I need to use this Error to log in controller level.. I dont want to use try and catch block for each and every Actionresult in my control.....

Yet another question on freelancing as ASP.NET developer

In terms of speed, quality and efficiency which framework makes more sense for freelance job offers: ASP.NET MVC or ASP.NET (Webforms) + Telerik ASP.NET AJAX? Assuming one has no experience with either framework, but wants to learn either ASP.NET or ASP.NET MVC just for that given scenario - doing freelance work. ...

can you put an asp.net mvc controller action in a windows scheduler

i have an asp.net mvc site and i have a controller action that emails out reports to people. I want to have this run on a daily basis so i am trying to use the scheduler on windows. As all i have is a URL, what is the best way of "executing" this url on a daily basis through windows schedular ...

How to build a DB based ruleset for web app achievement system?

I'm planning an achievement system for an ASP.NET MVC site. I want the achievement "rules" be stored in a database - to be easier to add new achievements and a central place to manage existing rules. Users will have no access to change the rules. When a user performs an action that could potentially earn an achievement, the db rules wil...

ASP.NET MVC 2 - Reevaluate ModelState

I have a Model bound by the default Model Binder. It registers a Property as invalid based on a DataAnnotations.RequiredAttribute Another property on the same model has a setter method that derives a valid value for that field and sets it. However the original ModelState Error remains. Main Question: Can I re-evaluate the ModelState? Su...

ASP.NET MVC Routing not Working in Virtual Directory

I have an asp.net mvc 2 app (using .net 4.0) that isn't routing correctly when hosted in a virtual directory. I have the following simple routing rule: routes.MapRoute( "Default", // Route name "{action}", // URL with parameters new { controller = "accounts" } // Parameter defaults ); ...

how to manage image file in c# for asp.net mvc web-application

How to manage user picture in c# for my web application i want all images as 1.png 2.png 3.png if user upload GIF and jpeg that it is convert to .png how i can do this. ...

VB.NET Default Namespace - problems using it and not using it... What is the way around this issue?

Hi, I am building an MVC2 website using VB.NET. I had a root namespace defined for the project but blanked it out because I wanted to have full control over the namespace for each class in the project. The reason I require this control is that I define a bunch of htmlhelper extensions and want them be in the same namespace (System.Web...

Reverse ajax Comet/Polling implementation for ASP.NET MVC?

I am looking for ASP.Net MVC implementation for reverse ajax comet/polling. Can anyone provide some good link or tutorial Regards ...

erb <% expression -%> in aspx pages

Do asp.net aspx views have tags that that work similar to the Ruby erb <% -%> ? I don't like all these line breaks in my asp.net mvc generated html. As for the other view engines (nhaml, spark, razor) I don't want to use them yet. Quick example of the difference between <% %> and <% -%> in erb: 1. <% %> <% 3.times do %> Ho!<br /> <% e...

Framework for implementing CMS

Hi, all We as a team want to re-implement our CMS, and migrate it to c# (from vb). We have two options (do we have other?): either implement from the scratch or take some open source project and modify and complete it as needed (license is not a problem, we can make our CMS open source too). I want to note that our team is more experie...

How to best handle permissions (not roles) in asp.net membership, specifically in ASP.NET MVC

There are plenty of questions (and information) on setting up asp.net membership, role providers and the like. Whether or not you should use the built in platform provided by microsoft, or role extend the base classes and role your own. I have decided to extend the default providers and implement my own membership and role providers. No...

asp.net mvc area default page

I have a MVC 2 site with an area, let's say the area name is {Admin} The areas and the site works fine. What I am trying to do is to have different default page for the area. When I am calling http://webSiteName works with no problem but for http://webSiteName/Admin I am getting the error The resource cannot be found I tried it...

Performance Improvement for Insert Statement

On my ASP.NET MVC application I'm running a couple of inserts at once that can insert 10000 or more lines and update a few others. This process is taking a long time but I can't escape the insert because that's exactly what I was asked to do. Right now I'm running Sql Server Profiler and it takes almost 20 minutes to insert this bunch of...

asp.net MVC open file from folder and view info such as extentsion and contenttype etc

HI there I know how to get details from a file when i am uploading it, but am unsure how to do this when the file is already on the server and i wish to get information like size, contentType etc drawn a blank much appreciated. thanks ...

The best way to bind a ajax call to Html.CheckBox

I have a list of items and each item has a Html.CheckBox. What is the best way to bind a ajax call to that checkbox. Is there a a sexy way "like" Ajax.ActionLink or just use jQuery for this? So my question is: is there a MVC ajax way of doing this or do I just do this with jQuery. ...

MVC.NET MultiSelectList Questions

So 2 questions, I have my html.multiselectlist working fine, however I want to do 2 things... Set a default selected value from my list Append a hardcoded value / entry within my list (which is pulling from a DB), which is basically a select "ALL" option. This is my controller code, so is there where I need to perform this task, or ...

mvc how can i return back to an action that calls RedirectToAction(..)?

Hi, I have an action Create() on my BooksController, where I create a new Book class. Part of this create process is to add one or more Authors, where Author is a class. Here's the way I envision this working: When user clicks "Create a new book" they are returned the Create view. User can click "Add Author" button at any time. ...

ASP.NET MVC How to determine if the e-mail didn't reach the receiver

In my web application an e-mail with credential information is sent to every newly registered user. For some reason, Hotmail and some other mail providers don't accept these e-mails at all (by the way, I send via hMailServer, maybe you know how to fix that) - they are neither in the spam nor in the inbox folder. So the users leave th...

Cannot get response from NServiceBus Saga

Cross-posting from Nservicebus discussion group here. The 2 min. story is that I am trying to get a response from a Saga back to my asp.net mvc front end. For some reason, the ReplyToOrginiator() method returns to message but the AsyncCallback in asp.net mvc is not able to pick up the message. However, if I try to use the Reply method...