asp.net-mvc

Caching ideas anyone?

Hi, I have the following, very interesting class... pubilc class Thing{ public Thing() { DoSomethingThatTakesALongTime(); } pubic boolean CheckSomething(string criteria) { return criteria == "something"; } } In my ASP.Net MVC application, I need to call make a call to CheckSomething, very frequently. As you can see, the constru...

Does asp.net MVC depends on Normal asp.net

Hi every one , this is my first question Here , I am a beginner in asp.net , and i want to make a CMS project using it After Some readings I found that the MVC structure is very suitable for Me Just want to know : how much the asp.net MVC depend on the normal asp.net?? as a beginner i don't know the level of knowledge for Normal asp....

Why does Response.Write render but Html.ActionLink does not?

Asp.net Mvc1 On my Views/home/Index.aspx which routes from http://localhost/DefectSeverityAssessmentMvcBeta/ This renders Response.Write("<a href=\""); Response.Write(Url.Action("Create", "Registration")); Response.Write("\">Begin Registration</a>"); But returns a 404 for the address of the link http://localhost/DefectSeverityA...

Any suggestion for 3rd parties .NET web form generator/builder

Do you have any suggestion for a product/solution that allow clients to create web forms online? This is the scenario: Superuser creates web forms and publish them for further usage (for other users of the site). I need asp.net or asp.net MVC. It would be good if it is possible to buy licence with source code, so I can customize and ad...

MVC 2 Beta DefaultControllerFactory with Areas

Why default factory WON'T return full name of the controllers (with namespaces)? I'm using Service Locator and autofac. using System.Web.Mvc; using Microsoft.Practices.ServiceLocation; namespace Application.Core.MVC { public override IController CreateController(System.Web.Routing.RequestContext requestContext, string **contr...

Error 5242 on LinqToSQL Execute Method

Hi all, I'm getting the following error during code execution of a particular stored procedure and i'm stumped. Some other stored procedures work correctly but this one doesn't for some reason. Warning: Fatal error 5242 occurred at Nov 25 2009 12:44PM. Note the error and time, and contact your system administrator Line 66: public...

Is ASP.NET MVC a good option for developing a Services layer and/or API?

Is ASP.NET MVC a good option for developing a Services layer and/or API? If so, are their any solid examples out there for reference. ASP.NET MVC views are generally tied to aspx pages, but how would I go about making my views in the form of XML or JSON? In the scenario I am proposing, I'll have an ASP.NET MVC front-end which will con...

AppSettings on a different .config file not being updated

I am trying to do the exact same thing mentioned on this recent previous question. In essence, here's the case (which is exactly my same situation): My plan is to have these (appSettings) in their own file (Settings.config), to which I will grant modify permissions to the web process user account, and store all editable se...

MVC asp.NET multiple buttons with no name

Hi All, Is there any way to check which button as caused post back in the controllfer action. My problem is I am using two buttons with no name attribute. How can i check which button has clicked when button is not having name attribute Please advice Edit : I can't give name attribute as i am using button controls created by intern...

Using RenderAction() and posting back to sub-controller action

I have parent view that also renders sub-controller action using RenderAction() (that returns a PartialView). An example is a front page with Login partial view (inputs: username, password, remember and action: login) Execution process GET for Home/Index - also displays my login control that has its login pointing to sub controller Us...

Multi-Database Transactional System & ASP.NET MVC

So I have a challenge to build a site that people online can use to interact with organizations.: http://stackoverflow.com/questions/1691058/asp-net-mvc-customer-application One of the requirements is financial processing and accounting. I'm very comfortable using SQL Transactions and stored procedures to do this; i.e. CreateCustomer a...

Ninject And Connection Strings

I am very new to Ninject and am trying Ninject 2 with MVC and Linq. I have a SqlProductRepository class and all I want to know is what's the best way of passing the connectionstring in the constructor if I am injecting the Repository object in the controller. public class SqlProductRepository:IProductRepository { private Table<Pro...

ASP.NET MVC - Castle ActiveRecord - Show SQL queries

I'm using ASP.NET MVC with Castle ActiveRecord as my persistance layer. I want to know if it's possible to show the SQL queries being executed on my MySQL server. I know it's possible in a Web application using the "show_sql" property in the Castle XML configuration file, but I don't know how to do it using a Web application, since I d...

bulk update from array

Hi All, What's the best way in asp.net mvc to take my array and save each element (and attaching a parentId to each as well) to my sql server db in one step? thanks, rodchar ...

Controllers and Views inside a Class Library

Hi, I've a group of controllers and Views that I use in many projects. I was wondering if I could place then inside a class library and reuse it as a normal lib file. How can I do this? ...

When is the MasterPageFile located in ASP.NET MVC WebForms ViewEngine

When is the MasterPageFile property of a view/page checked that it exists in ASP.NET MVC WebForms view engine? What I want to do is have the following code not output the error: Parser Error Message: The file '/SomePlaceThatDosentExist/Site.Master' does not exist. Defined as such in my view's .aspx file: <%@ Page Language="C#" Ma...

HttpContext.User.Identity.IsAuthenticated throwing System.NullReferenceException

Why is HttpContext.User.Identity.IsAuthenticated throwing System.NullReferenceException in the base controller from where my all other controllers are inheriting from. I think the HttpContext is not ready inside the constructor of my base controller. This is the code: public abstract class BasicController : Controller { private ...

Asp.net MVC-How to add order-orderDetails objects using EntityFramework?

I have an application that uses one-to-many relationshipped objects like oreder-orderDetails, vith EntityFramework. I want to use a view, that make it possible to add a new order with some orderDetails objects. I can create a strongly typed view, that returns an order object wich has a List orderDetails property, but can't populate the...

ASP.Net 2.0 and the new RenderAction method.

Hello, I just recently migrated my ASP.Net MVC project from MVC 2.0 Preview 2 to MVC 2.0 Beta, and my calls to Html.RenderAction broke because a new RenderAction method was introduced in MVC 2.0 Beta. In the following line: <% Html.RenderAction("DisplayIMHandles", "UserProfile", new { userProfileId = Model.Id }); %> I get the follow...

How to I make castle windsor automatically register controllers that don't have any dependencies?

I know I can specify it in the configuration XML, but I'd like to not have to do so for every controller. For example: I have a controller without any dependencies being injected, but I'd rather not type out the XML component section in the config file or register it programmatically. Any ideas, suggestions, examples? Thanks for all the ...