asp.net-mvc

Content Disposition Issue in C#

I am setting the disposition of either inline or attachment based on users selection. It works but very intermittently. Once I select inline for the same file in the same browser, it works as expected. Once I switch to attachment, I don't get the desired results unless I close and reopen the browser. I do flush the context and clear it a...

How to produce a 3-column list?

I have to produce a 3-column list of items similar to what can be seen for the different groups (mostly banks and financial institutions) at this page: http://funds.ft.com/FundDirectory.aspx (even though these are horizontally aligned divs) I have all the items I need to add to the 3 columns in a List<Group> stored in my Model.Groups o...

intellisense with razor and VS 2010

Is there any way to get intellisense with razor in VS 2010, I am working on an application with web matrix and launched VS 2010 from WebMatrix. ...

ASP.NET MVC application defaults to LogIn view on live site, Home view on localhost

Hello SO: I am in the process of creating a website using ASP.NET MVC. I went to publish it to the web, and for some reason the LogIn view comes up rather than Home view. I have not implemented (not sure if I intend to) any sort of logging in at all since this is a rather simple web site. I am 99% certain I am overlooking something ext...

Submit a form in a jQuery Dialog box and close upon successful POST to MVC Action

I am using the method from this question to create a pop-up to show a form where the user must "sign" it and then click submit. I have the pop-up working and displaying data. Now I want to submit the form to a POST action and close the pop-up if the POST was successful. I have been scouring the internet looking for something close to w...

How do I create multiple entries in one view in C# ASP.NET MVC?

I have a Company model and an Employee model and I want to create a Company and then create multiple employees for the company in one view. How should I do this in the view? And what should I do in the Create POST method to support this multi-entry view? ...

Bypass Ext Direct on HttpRequest

Our company app utilizes the Ext Direct so it bundles and sends requests from our client to the our MVC framework. Currently I'm working on a side project to test out GWT, and would like to get my test page to talk to our server. My question is if it is possible to bypass Ext Direct to send an http request to mvc directly, or Ext direc...

ajax and role attribute

I have an asp.net mvc web app that has controllers with role attributes on them for checking authenticated user roles. I ran into a problem with ajax where I have ajax "get" requests that trigger additional role and user checks each time a page is loaded up. Right now when I load up one of my pages I have the same query running 4 times ...

MVC partial View jQuery datepicker removing previous date pickers

I have a page where I am trying to add Children to a Parent object. On the page, I have a link, "Add Child", that calls an ajax get, returning a partial view with textboxes for the Child. In the sucess, i am doing a function to add the results to the innerHTML of a div. On the partial view, I have a textbox for the Birthdate, named "B...

ASP.NET compilation and separate assemblies

I am unfamiliar with the way ASP.NET (using MVC) deals with .dll files and would like to know why the following behavior occurs: In both scenarios, there is a primary MVC application and a secondary MVC application (MyApps.Secondary). And in both instances, the secondary application has hard coded view locations in the actions. Scenari...

Debug ASp.NET MVC with IIS5 in Visual Studio 2008

Hello, I have been trying this for some time but could not figure out yet. Is there a way to choose IIS5 as the web server instead of the default Cassini which comes with Visual Studio 2008? I have web flow(request, response) from my web site to a 3rd party provider and would like to know what I am getting back from the 3rd party. Ri...

Update dropdown values

In the ViewModel: SelectSafetyContacts = new SelectList(subcontractRepository.GetContacts(Subcontract.company_id), "contact_id", "contact_name", Subcontract.safety_contact); In the Repository: public IQueryable<contact> GetContacts(Guid id) { return db.companies .Where(c => c.active_status == true) ...

Good/Simple shopping cart example using asp.net mvc and jquery

Is there a Good/Simple shopping cart example using asp.net mvc and jquery? Any suggestion... ...

Can Html.RenderAction be used as ASP.NET MVC 2.0's "donut caching"?

I'm not at a development system where I can test this. If I output cache a view, and inside that view have a Html.RenderAction that loads some html from a separate action, would that newly pulled in HTML be cached or would Html.RenderAction run every time, thus acting as donut caching for ASP.NET MVC 2.0? ...

How can we pass class instances to view ?

Hello Everybody I just wonder that can we pass any type of class instances to view which is not exist in our Model repository.for example i just want to show property values of any class instance which exist in .net framework such as List, ListArray and others. Edit: Question is edited cause misunderstanding possibility. ...

How can I hide ActionLinks based on user roles?

In a standard, generated list view, how can I hide certain ActionLinks based on the roles the logged in user belongs to? ...

Reusable pageable list in ASP.NET MVC2

For example, this list contains an overview of documents and needs to allow paging. The list is used throughout the website. Depending on the context where it is used, it needs the data from a different source. For example, it can be used on a 'group' page, where it needs to load the documents for the group. And it can be used on an 'ev...

asp.net mvc test project cannot find windsor file

Hi there Im using windsor as a DI container, my code is below public static class ContainerBuilder { public static IWindsorContainer Build() { var container = new WindsorContainer("Configuration\\Windsor.config"); // automatically register controllers container.Register(AllTyp...

Display AJAX controller action result using HtmlHelpers

Hi, I have a fairly complex object which has some C# code written to render it as HTML in various views. There is also a view which can call an AJAX method of a controller, which returns the complex object serialized to JSON which should then be displayed. This seems to leave me requriring complicated duplicate code to render the resu...

How do I know which action will execute using an ActionExecutingContext object?

Hello, I've this action filter that executes before all the action methods executes. protected override void OnActionExecuting(ActionExecutingContext filterContext) { //code omitted UpdateModel(MyModel); } I want this action to update the model when actions A, B, C are supposed to execute, not D. How do I prevent this filter ac...