mvc

What ORM do stackoverflow use with their ASP.Net MVC project?

What ORM do stackoverflow use with their ASP.Net MVC project? ...

Low case urls in ASP.NET mvc.

Hi. Is it possible to force/extend routing engine generate urls in lower case, "/controller/action", instead of "/Controller/Action"? ...

Accessing RequestContext from global.asax

Does anyone know how to get the current RequestContext from the Application_Error event in global.asax?? My problem is that i need to do a redirect, and thereby need to have the url generated using UrlHelper - which takes the aformentioned RequestContext. ...

Referencing script files from MVC

I am having problems referencing scripts that should be included in my view, when I access the page using a different route my scripts fail. The idea is that two routes actually point to the same action: http://localhost/PaydayWebsite/registration http://localhost/PaydayWebsite/organizations/p001/departments/vest/employees/chn/registr...

ActionLink pointing to route not affected by current route

I have am problem because I have a menu where the links always should point to MyController/MyAction, but the site has other routes that go to the same action, but with more parameters. <%= Html.ActionLink("MyLink", "MyAction", "MyController")%> Will give me the route but if I am currently on the same action and controller, but with mo...

ASP.NET MVC including ASP in Javascript

Hi, Is it possible to put ASp.NET tags in my javascript which is in a seperate script file. For example, I have the following $.getJSON("/Postcode/GetAddressResults/" + $get("SearchPostcode").value, null, function(data) { which I want to turn into but it does not like the ASP tags! var action = "<%=Url.Content('~/Postcode/GetAddr...

MVC Vs n-tier architecture

Hi I was wondering what exactly is the difference between MVC(which is an architectural pattern) and an n-tier architecture for an application. I searched for it but couldn't find a simple explanation. May be I am a bit naive on MVC concepts, so if anyone can explain the difference then it would be great. cheers ...

ASP C# Can I use MVC?

In my web application I have a treeview with documents. The NavigateUrl of a treenode looks like this: viewDocument.aspx?id=1&doctype=type. In the load event of ViewDocument.asp.cs i check whether id and doctype are set. If so, check doctype has a valid value and check the id is a number. After that, i create a document object. Then i ca...

ASP.NET MVC Pass mutiple params from getJson to controller

Hi, I am making a call to a controller action in javascript using the getJson method. I need to pass two parameters to my action method on the controller, but I am struggling to do so. I do not fully understand the routing tables and not sure if this is what I need to use to get this working. Please see example below of what I am tr...

model view controller listview interface query

Just starting out using model view controller design pattern in a mobile application and I have a quick query. Basically if I have a listview control on my view and my controller needs to access properties on the listview when an action is performed, like the items checked and the listviewitem vales, do I just expose on my view interfac...

Creating a URL in the controller .NET MVC

I need to be able to construct a link in the Action on the controller to send an email. What is best practice to do this? I don't want to construct it myself in case my routes change. Should I have a view for each email and render that and send it? That might be a good way of doing it. ...

ASP.Net MVC MapRoute problem

There seem to be a lot of issues on SO dealing with MapRoute problems. I've read through a bunch of them, but I can't see what I'm doing wrong in my implementation. I've got the following routes set up: routes.MapRoute( _ "FilesDisplay", _ "{controller}/{action}/{year}/{month}", _ New With {.controller = "Files", .action = "...

In ASP.Net MVC 1.0 How do I insert model child data?

I am just playing around with MVC for the first time and am having a problem. Let's say I have 2 tables - Person and Location. Location has a foreign key relationship to Person - so 1 person can have multiple locations belonging to them. In my view I have form inputs for the Person fields - this works fine. However, I also want to h...

webservices with repository pattern in c# and WCF?

Hi there, Can anyone confirm the best way to integrate the repository pattern with webservices.... Well actually i have my repository patter working now in c#. I have 3 projects, DataAccess, Services and my presentation layer. Problem is my presentation layer is a number of things... I have a ASP.NET MVC site, I have an WPF application...

ASP.NET MVC posting with Ajax.BeginForm returns blank view

I have a page that contains multiple inputs - I'm using Ajax.BeginForm to build a form for each set of inputs. <% using (Ajax.BeginForm(new AjaxOptions() { InsertionMode = InsertionMode.InsertAfter, HttpMethod = "POST" })) { %> <input class="smallInput" type="text" name="duration"/> <input type="submit" value="Add" /> <% } ...

The Taligent Programming Model for .Net

Has anyone created a control architecture using the taligent programming model as follows? http://www.wildcrest.com/Potel/Portfolio/mvp.pdf The question is how do you implement or map the IInteractor concept (Page 9) to a .net interface? Currently the guess is to use the IInputElement interface as a the event source for all UI input co...

Child records not posting on ASP.NET MVC form

I have two tables, Author and Book, where an author can have many books. I've got an edit view set up as "System.Web.Mvc.ViewPage(of MyDatabase.Author)". The form is set up to show the Author and all his books, with the ability to edit book information: <% Using Html.BeginForm()%> <%=Model.author_name%> <br/> <% For Each item In Model.B...

ASP.NET / MVC 1.0 Components and Ajax controls - Grid - Calendar - Search?

Hello I'm rather new to developing with MVC and I'm looking to find as many Ajax controls that integrate seamlessly into my new MVC 1.0 ASP.Net application. Specifically, tree controls, searching, outlook calendaresque, and inline updating. ...

ASP .NET anonymous users not getting stored in database

I'm trying to setup anonymous users in MVC. For some reason it wont store the users in the database. I have added the following in the web.config <anonymousIdentification enabled="true" /> It successfully creates the .ASPXANONYMOUS cookie when i visit the site but doesn't create the user in the database. Is this something i have to d...

Is it possible to automatically derive the components of a cache-key in rails?

When generating cache-keys for rendered content in web applications, you have to take into account all variables that might change the result. In dynamic environments like rails these can be defined in different places: the controller, a model, the session or the server environment. And they can be referenced in the template, in a templa...