asp.net-mvc

How do you force Visual Studio 2008 to generate designer.cs e.g. Whatever.aspx.designer.cs

I have some webforms in an Asp.Net V2.0 generated using Visual Studio 2005 using Web site technology Want to import them in to Visual Studio 2008 set to v3.5 (Asp.Net MVC) - where I use Project technology I'm using Add > Existing Item - Which brings in Whatever.aspx & Whatever.aspx.cs There is no Whatever.aspx.designer.cs to import H...

ASP.NET MVC 1.0: OutputCache, RenderPartial and WriteSubstitution

Hi folks, after digging into this topic and having the requirement, that a single page should be totally cached, except for a Html.RenderPartial("LogOnUserControl"); i couldn't find any working solution on this... the only "its getting warmer" solution i found was this one , which unfortunately is not working with a "partial view", ...

My Website was hacked using Statcounter! Does Statcounter keep a record of cookies?

I had a rather interesting case of hacking on my ASP.Net MVC website. For this website I had implemented a rather uncomplicated authentication system for my admin area -- an encrypted cookie which had an identifying signature for the member. Whenever the admin visits the website the cookie would be decrypted and signature verified. If ma...

Any CMS for Asp.net MVC that used subsonic as backend?

Is there any CMS available for Asp.ne-MVC that used subsonic as backend DAL? ...

Creating my own simple CMS for asp.net-mvc?

I want to create a simple CMS for my asp.net-mvc site. Needs some help to start. Will i save my whole page to db? what if my page contain links like Url.Content("~/somepage") When the admin will edit the page he will get the plain link not the Url.Content. How i can handle this in CMS? Is there any CMS available based on subsonic? ...

Most mature ASP.NET MVC Blog Engine?

What's the best ASP.NET MVC based blog engine out there which is ready to deploy? I am guessing there are no MVC blog engines which are comparable with WebForms based blog engines like dasBlog, BlogEngine and subText? I think Oxite is a dead end and Orchid is more like a CMS. Looking for an engine which can do these: RSS feeds support...

How do I add dynamic htmlAttributes to htmlhelper ActionLinks?

In my master page I have a top-level menu that is created using ActionLinks: <ul id="topNav"> <li><%=Html.ActionLink("Home", "Index", "Home")%></li> <li><%=Html.ActionLink("News", "Index", "News")%></li> <li><%=Html.ActionLink("Projects", "Index", "Projects")%></li> <li><%=Html.ActionLink("About", "About", "Home")%></li> <li><...

Is REST mandatory for MVC?

I am beginning on ASP.net MVC. All the articles I have read so far mention REST as a key feature in MVC implementation My question: is REST mandatory for MVC implementation? ...

How can I convince IE to simply display application/json rather than offer to download it?

While debugging jQuery apps that use AJAX, I often have the need to see the json that is being returned by the service to the browser. So I'll drop the URL for the JSON data into the address bar. This is nice with ASPNET because in the event of a coding error, I Can see the ASPNET diagostic in the browser: But when the server-side ...

Null reference to DataContext when testing an ASP.NET MVC app with NUnit

I have an ASP.NET MVC application with a separate project added for tests. I know the plusses and minuses of using the connection to the database when running unit tests, and I still want to use it. Yet, every time when I run the tests with the NUnit tool, they all fail due to my Data Context being null. I heard something about having a ...

asp.net mvc client side validation on multiple forms in one page

I have 4 forms in my asp.net mvc view. I have enabled client side validation on each by put <% Html.EnableClientValidation(); %> Above Html.BeginForm() of each form. The issue is that regardless of the fact that I've specified ID's for the forms the first form on the page gets validated whenever I click submit of the other forms. Is th...

how to refresh mulitple divs when after posting using jquery

i have a screen with multiple little widgets (all with different divs around them). i have one form and when i post (using jquery) right now it updates the single form using ajax. i want two other divs to refresh as well (that are outside the form). What is the best way to trigger a refresh of multiple different divs on a single jquer...

How do you make an AJAX callback trigger another AJAX call?

Is there a way to have the callback of one AJAX trigger another AJAX call? Or will that go out of scope? ...

Can the controller take an interface instance as a parameter ? ASP .NET MVC

Can a ASP .NET Controller action method take an interface as one of the parameters ? I would like to have something like: class MyController { [HttpPost] public ActionResult Action(IMyModel model) {...} } Is it possible ? Obviously I would have to tell the framework which concrete implementation of IMyModel that should be in...

How do you return a partial view with spark?

I am using the SparkViewEngine and I am calling an action that I want to return a Partial View to update just a section of the page. When I return the view on the action the masterpage and all of its content gets returned. How do you tell a partial in spark to just return the content of the partial view and not put the content inside t...

MvcContrib.CommandProcessor.RulesEngine tutorial(s)

Hi! I am studying the CodeCampServer. I am confused about the ASP.NET MvcContrib.CommandProcessor.RulesEngine. Are there any tutorials about the RulesEngine of the MvcContrib? Or can anybody of you explain me how does this work and what benefits I gain? ...

ViewResult or ActionResult | does it makes sense to use ViewResult if ActionResult is good for everything anyways ?

In asp.net mvc there is ViewResult for returning a View and ActionResult for returning whatever you want, so is there some good reason why should I use ViewResult instead of ActionResult when I'm sure that I will return a View ? ...

ASP.NET MVC: How to transfer more than one object to View method?

I finished NerdDinner tutorial and now I'm playing a bit with project. Index page shows all upcoming dinners: public ActionResult Index() { var dinners = dinnerRepository.FindUpComingDinners().ToList(); return View(dinners); } In DinnerRepository class I have method FindAllDinners and I would like to add to...

A public web API: What do developers prefer to consume?

We've got a bunch of data that we'd like to expose to the world hosted on an asp-net.mvc website. I'd like to ensure that we deliver it using technology that is easy for end developers to implement and not tied to any particular platform, rather than using technology that is unpopular/incompatible with developers. The kind of requests w...

How to html encode the output of an MVC view?

I am building a web app which will generate lots of different code templates (HTML tables, XML documents, SQL scripts) that I want to render on screen as encoded HTML so that people can copy and paste those templates. I would like to be able to use asp.net mvc views to generate the code for these templates (rather than, say, using a Str...