asp.net-mvc

Concerning Major Changes to a Project

Whats the best way to go about upgrading a project with major design changes...in terms of project files (I guess)? I recently moved my website from ASP.NET to ASP.NET MVC and it was obvious that changes were so major it required a complete rewrite. Now I am preparing to move it to MVC 2, to take advantage of more features of the new f...

What are the Alternatives to Google Analytics

I need to Track Unique Visitor count in my web application. I would really like to use Google Analytics but due to the Load limitations that google imposes I will not be able to use them. I am expecting WAY over 10,000 requests a day. This is the limitation that Google web analytics API imposes. Is there another company that has the same...

Mouseover for entire row in MVC

How to show and hide one particular column in Mouse Over and Mouse out receptively. on mouse over i want to show column in a single row and on mouse out i want to hide the column in that particular row. any answer will help me thanks in advance. ...

What are the features and advantages of Asp.net MVC?

Hi all, What are the features and advantages of Asp.net MVC? Please help with details. ...

How can I profile an ASP.NET MVC View?

I'm trying to improve the performance of an ASP.NET MVC app. Pages take about 700 msec to display, and I know that my controller takes about 200 msec. This means the View is taking 500 msec. How can I profile a View? I don't know regular ASP.NET -- perhaps there are standard things everyone else is aware of? My View iterates over my...

How to access the MVC "action" from the current request?

Hi Is there a way to retrieve the current routing action from a MVC request? Cheers, raj ...

Time out Ajax requests with jquery?

Hi I think that you can set like on post and get methods in jquery timeouts but I am wondering does jquery have a global timeone like it has with ajax start and stop. Like I would like to set it that if say a post or get or some sort of ajax request is running and it runs more then X amount of seconds. That a popup or something in that...

Start and End time using jquery

I need to enter the start date, start time, end date and end time in my asp.net MVC application. date fields are textbox and time fields are dropdown. How can i fill the time dropdowns using jquery.? Also i need to restrict the user to select the invalid time periods. For ex.: when the user selects 9:00 AM in start time dropdown, the ...

How to handle the error if theres a broken link in asp.net mvc?

For example on my site i got links to twitter,facebook etc. and the link to the facebook is wrong, so when click the facebook link on my asp.net mvc page. HTTP 404 will be thrown by the browser, so how can this be handled as this wont be caught by Application_Error in the global ascx page. One way i could think of is tht clicking the li...

trust medium in asp.net mvc

When i try to run my project in trust medium or high it says [PolicyException: Required permissions cannot be acquired.] [FileLoadException: Could not load file or assembly but i'm running all the assemblies in bin only. ...

Why does my ASP.NET MVC application work from a virtual directory, but not from a website?

I created an ASP.NET MVC application on my local computer under IIS 7.5 (Windows 7 RC) in a virtual directory (like http://localhost/MyApp). Now that I'm trying to deploy it to a remote server I get strange results. The application seems to route every request to the Forms Authentication login form, and requests for static content (fro...

ASP.NET MVC Validation Framework when posting via jquery $.ajax?

Hello, There is a plenty of very good post and explanations how to implement validation with ASP.NET MVC, and I prefer one of these: xVal Validation with Service layer Data Annotation attributes However, I really like to call ActionMethods via jquery $.ajax method. One of the reasons why I want to use $.ajax is because there will be...

Why would a WCF webservice hosted in IIS randomly stop responding?

This is my first attempt to use WCF so there may be something fundamentally wrong with this approach - if so I'm happy to switch to a different model. At quick glance, I thought the answer to this question would have worked, but my scenario appears to be different. I have an ASP.NET MVC website where the controllers access the WCF clien...

404 with iis7 asp.mvc doc and pdf files in folder

Hi, I have got folder "binaries" in my web application. I would like to download pdf and doc (static ontent) files from that direcotory but when i try to get them i have got error 404. I tried to set up static module for *.doc and *.pdf but it not works. ...

Fetch Single Item Using DataContext

I'm doing the following: public MyItem FetchSingleItem(int id) { string query = "SELECT Something FROM Somewhere WHERE MyField = {0}"; IEnumerable<MyItem> collection = this.ExecuteQuery<MyItem>(query, id); List<MyItem> list = collection.ToList<MyItem>(); return list.Last<MyItem>(); } It's not very elegant really and I was hopi...

How do I create a well-structured ASP.NET MVC multi-site codebase?

I'm working on a project that has the ultimate vaguely-defined requirement: "Site should be 'skinnable' for other clients." As we all know, there are almost always UI, logic and model changes that have to be made. I've explained that work will be required to add another client to the site, and that it won't be as simple as creating a n...

jquery Full Calendar not showing events

I am using asp.net mvc to list the events in the jquery full calendar. Below is the script i am using to list the events through json from mvc. $('#calendar').fullCalendar({ theme: true, editable: true, disableDragging: true, disableResizing: true, header: { left: 'prev,next today', center: 'title', right: 'month,bas...

Rendering two Partial Views on the same Page

I can display a list of all customers and I can display a list of all orders and I would like to take this further. I would like to render two partial views on the same page to show customer details and orders relating to that customer. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mv...

Returning a single value with Linq to SQL

I'm learning Linq to SQL and I'm having trouble grasping it. I'm trying to simply return a single (boolean) value in C# with a Linq query. I want to see if the owner of a story would like an email notification sent when new comments are added. I would like the method that contains the Linq to SQL to return a boolean value. public bo...

Checking if radio buttons are checked in Firefox

On my site, I have two checkboxes created in my ASP.NET MVC view like so: Html.RadioButton("check", "true", "true" == (string) ViewData["someKey"], new { id = "check1"}); Html.RadioButton("check", "false", "false" == (string) ViewData["someKey"], new { id = "check2"}); I am positive that ViewData["someKey"] has the value "true" in it....