asp.net-mvc

Internet Explorer Caching asp.netmvc ajax results.

I'm having an issue with a page in internet explorer. I have an ajax call that calls a form, in other browser, when I click the link it passes in the controller and load correctly data. but in IE, when its loaded once, it aways brings me the same old results without passing in the controller. ...

File upload in asp.net mvc using ajax

I have a simple html form with two controls: input-text and input-file I need to write an ajax query (using jquery is better) to send data (file and value from text field to mvc acton) I wrote $.ajax({ type: "POST", url: "/controller/acton", enctype: 'multipart/form-data', data: 'text=' + $("#text").val() + '&file=' +...

Error referencing System.Web.Mvc from csc in Visual Studio 2010 RTM

csc /target:library /reference:System.dll,System.Web.dll,System.Web.Mvc.dll Foo.cs Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1 Copyright (C) Microsoft Corporation. All rights reserved. error CS0006: Metadata file 'System.Web.Mvc.dll' could not be found (Note - it does exist in the GAC under GAC_MSIL fol...

appointments scheduler managment with asp.net MVC

I'm building an Appointments Scheduler manager on asp.net mvc. My requirements are: The administrator will add timeslot appointments to the calendar for each persons in the company who can receive a client The client can search online for available timeslot appointments and can make a reservation Idealy, the UI can show the appointsme...

How do I attach a link (to a View) to an image in ASP.NET MVC?

Ok, so here is my situation. I am creating a web application using ASP.NET MVC 2 using the C# language. I have programmed in HTML, CSS, and PHP for several years and I am very new to ASP.NET. The part that I am having trouble with is the image gallery. The setup: I have a link on the navigation bar that goes to a "Galleries" page. T...

Two fields with the same name

I have a ViewModel class to encapsulate "Personal" and "Business" models. My problem is that both models have a property called "Email" and the model binding is not able to make a distinction between the two. I read that [Bind(Prefix = ... is used to resolved this issue, but I have not been able to see a concise example on how to achie...

ASP.NET MVC 2 form submit route issue

Hi, i'm having this issue, in ASP.NET MVC 2 where I'm adding a drop down list on the master page and filling it with data from an abstract master controller. When an option is selected an submit button clicked, it reroutes you to a new page. so lets say the page lives on http://domain.com/landingPage i'm on: http://domain.com/landingP...

Creating a SelectListItem with the disabled="disabled" attribute

I'm not seeing a way to create, via the HtmlHelper, a SelectListItem that will spit out the following HTML: <option disabled="disabled">don't click this</option> The only properties SelectListItem has are: new SelectListItem{ Name = "don't click this", Value = string.Empty, Selected = false } The only option I see is to Sub...

MVC templates where create template and edit template need to be different?

I've found information about Editor and Detail templates based on object name (i.e. DateTime, MyCustomObject) for use with MVC system. I am just wondering if it was possible for creating templates for use when creating the items in a similar fashion, where the form used for Creating the items is going to be different than the Editing Sc...

Is there a free JQuery plugin for grids

I have been looking for a JQuery grid to work with ASP.NET MVC and I can't find any free ones. Surely someone must have written an open souce one?? ...

Invoke an AsyncController Action from within another Controller Action?

Hi, I'd like to accomplish the following: class SearchController : AsyncController { public ActionResult Index(string query) { if(!isCached(query)) { // here I want to asynchronously invoke the Search action } else { ViewData["results"] = Cache.Get("results"); ...

What design considerations should one take to receive text and multiple attachments via web?

I am developing a web application to accept a bunch of text and attachments (1 or more) via email, web and other methods. I am planning to build a single interface, mostly a web service to accept this content. What design considerations should I make? I am building the app using ASP.NET MVC 2. Should the attachments be saved to disk ...

Is there any real benefit to using ASP.Net Authentication with ASP.Net MVC?

I've been researching this intensely for the past few days. We're developing an ASP.Net MVC site that needs to support 100,000+ users. We'd like to keep it fast, scalable, and simple. We have our own SQL database tables for user and user_role, etc. We are not using server controls. Given that there are no server controls, and a cu...

Changing the generated code for "Add View"

I would like for the generate "List" view contents to have a check added to it to first check that the model has elements, it occurs to me that I have no idea how these views are generated. Can those be changed? ...

Best Practices with MVC Route

If this is asked before just point me in the right direction I am a OO and MVC newbie. I am following along the MVC Storefront(a little outdated now) where they are talking about routes and adding them to global.asax.cs My question is this: wouldn't it be better if only 1 route is defined and after that everything is done programaticall...

Combobox in jquery

Hi, I've searched Internet quite a long time. But no combox box fit my need was found. Can anyone help me? Thanks in advance! What I need is a dropdown list have a editable box, which act exactly as the combobox in Windows desktop applications. I have a list of value for the user, but I also what them to type if the options there doest...

Implementing a Suspension or Penalty System for Users in ASP.NET MVC

I'm writing a site in ASP.NET MVC that will have user accounts. As the site will be oriented towards discussion, I think I need a system for admins to be able to moderate users, just like we have here, on Stack Overflow. I'd like to be able to put a user into a "suspension", so that they are able to log in to the site (at which point the...

Setting the AccountController in ASP.NET MVC 1.0 Template Not to Connect to SQL Server Express

I'm writing a website in ASP.NET MVC, using the ASP.NET MVC 1.0 template that was added to VS2008 for me by the ASP.NET MVC installer. The template automatically adds an AccountController, but its account methods tie into a SQL Server Express entity. I don't have Express installed here. How can I reconfigure it to use my SQL Server 2008 ...

Trying to use HttpWebRequest to load a page in a file.

Hi, I have a ASP.NET MVC app that works fine in the browser. I am using the following code to be able to write the html of a retrieved page to a file. (This is to use in a PDF conversion component) But this code errors out continually but not in the browser. I get timeout errors sometimes asn 500 errors. Public Function GetPage(ByV...

How to get fully qualified path of css file?

Hi, In ASP.NET MVC how do I get the fully qualified path to my css file by specifying the relative path. Eg Url.Content("~/Content/Print.css") This returns eg "/Content/Print.css" Where as I want http://www.mysite.com/Content/Printcss Understand the issue? Malcolm ...