asp.net-mvc

Default.aspx not getting executed in ASP.NET project with MVC sections

My app is mainly an ASP.NET app that I'm adding an MVC section to it. My Default.aspx (no codebehind) page has a simple Response.Redirect to a StartPage.aspx page but for some reason MVC is taking over and I'm not getting to the StartPage.aspx page. Instead I get routed over to my first and only MVC section which is a registered route t...

Dynamic table row not being updated via jquery ajax call

Hi there, Having a bit of a hairy issue when submitting data over a jquery ajax call. Basically, form values of form fields which have been dynamically added to the screen into a tubular grid using jquery are not updating on a batch save command. Basically I have a grid listing which displays all current rows saved to the database with...

ASP.net MVC: Where to keep application data?

I am just starting porting an application to ASP.net MVC and I have an object holding application state (it keeps track of certain processes running on the machine, starting and stopping as necessary and sending/receiving MSMQ message). Where should I keep this object? In my current application (based on HttpListener) it is a singleton...

Space in routing gives 404

Hi there. I currently have this route defined (among others): "{controller}/{action}/{id}/{designation}" being: "id" my primary key "designation" only used for SEO and not taken into account. now my problem is: "http://server/Home/Index/1/teste" works but "http://server/Home/Index/1/teste " with a space in the end doesn't. IIS is g...

Place for validation

In my application i use this structure: Controller -> Services -> Repositories I create repositories + filters as dal layer. But i place validation methods (for required fields for example) in service layer. Is this correct? Or better will be if i replace validation in repository layer? And second question. In this architecture servi...

If using LINQ to SQL is there any good reason to learn SQL queries/syntax anymore?

I do understand SQL querying and syntax because of previous work using ASP.NET web forms and stored procedures, but I would not call myself an "expert" in it. Since I have been using ASP.NET MVC and LinqToSql it seems that so much of the heavy lifting is done for me and encapsulated away at the SQL end that I'm questioning whether ther...

Does ASP.NET MVC require IIS?

Does ASP.NET MVC require IIS? Could I develop an application that uses the new ASP.NET MVC framework on a client machine that does not have IIS installed? ...

Disadvantages of the ASP.net MVC Webforms View Engine?

I'm planning a new project at the moment, built on MVC. Now, there are several different View Engines, and I just wonder what the disadvantages of the Webforms engine are that would justify a switch? Some people feel really strong against it, and I just wonder why? Can I still retain something like .ascx Controls with other View Engines...

Why is ValidateInput(False) not working?

I am converting an application I created using webforms to the asp.net mvc framework using vb.net. I have a problem with one of my views. I get the yellow screen of death saying "A potentially dangerous Request.Form value was detected from the client" when I submit my form. I am using tinymce as my RTE. I have set on the view itself ...

ASP.NET MVC Authorization and roles per team_id

Hi, i'm starting a project using ASP.NET MVC and i can't figure out what's the best way of handling authorization and roles based on a team_id. Every blog entry or forum post i read always talk about defining a global role("admin", "helpdesk", "editor", etc...) using asp.net membership or creating a CustomAuthorize filter. The problem in...

ASP.Net MVC routing action name conflicts

Hi, We have a website that deals with artists and venues and we're developing it in ASP.net MVC. We have our artist views in a folder (Views/Artists/..), an ArtistsController, ArtistsRepository and adhere to the REST action names such as Show, New, Delete etc. When we first mocked up the site, everything worked well in our test enviro...

ASP.NET MVC model binding and validation question

I'm trying to use MVC for a new project after having been around the block with all the samples and tutorials and such. However, I'm having a hard time figuring out where certain things should take place. As an example, I have an entity called Profile. This entity contains the normal profile type stuff along with a DateOfBirth property ...

How do I insert a bit of XML into an XDocument using Visual Basic?

I'm trying to create a sitemap in an ASP.NET MVC project. This code in my Node controller... Function Sitemap() As ContentResult Dim db As New EfrDotOrgEntities Dim Nodes = db.Node.ToList Dim RequestUrl As Uri = Url.RequestContext.HttpContext.Request.Url Dim AbsoluteRoot As String = String.Format("{0}://{1}", RequestUrl...

Is there an equivalent to Monorail view components for the ASP.Net MVC Framework?

I make heavy use of View Components in some of the larger applications I've built in Monorail - What is the equivalent approach in ASP.Net MVC for a view component, that can support sections etc.? ...

dealing with jquery events in ASP.NET MVC

I'll try to make this as simple a posible. I just started working with jquery and don't know what's the best aproach to do what i want to do or if i'm completely wrong. I'm trying to make a simple "recommend" button to recomend articles but i want that once the user has recommended one article he can't recomend it again. So far i got ...

Microsoft MVC

Hi, I am pretty close to be done with a website using the entity framework and standard asp.net+ajax, but now I am thinking if it would be smarter to start over and do it with microsoft mvc. Is MVC going to be THE new thing, and should I try to implement it? How does MVC perform on high traffic sites? ...

ASP.NET MVC - Dot Net Nuke

How we can create a application like dotnetnuke with the help of MVC. We can add modules and other things directly without modification to code. ...

How to process many form input fields using ASP.NET MVC

I am writing a survey application, and I have a form that can have potentially hundreds of input fields. How would I write the controller to process this form? I can't specify each input as a parameter for the controller, that would be unrealistic. I found out about the MVCToolkit, and the UpdateFrom() method, but is this the right ...

ASP.NET MVC model binding and action parameters

Let's say I have a controller action defined as: public ActionResult(MyModel model, string someParameter) { // do stuff } I have a custom model binder for the MyModel type, and there is a form field called "SomeParameter" in the view that is not bound to the model. How does ASP.NET MVC know to pass the value of Request.Form["Some...

Error when trying to build asp.net mvc web application with TeamCity

I have an Asp.Net MVC Web Application that I am developing. I have TeamCity installed on my development workstation, and have been running CI builds on. All has been working fine. I'd like to move TeamCity off of my machine, and onto the new dev/build server that was just delivered. I do not want to install Visual Studio onto the build s...