Map a route to the same controller action
I want only one controller action to handle all GETs. How can I map a route to do this? ...
I want only one controller action to handle all GETs. How can I map a route to do this? ...
I realize that ASP.NET MVC has all the hype. I have my doubts that I need it, but wanted to explain my potential project: This is an internal LAN application. It is doing CRUD operations and a little reporting. The user base is small (< 12 people) and there is not tons of data There is not a huge number of screens (Maybe 20) I don't ca...
I downloaded the code and am following the sample Guy from Queensland How can I refresh the chart when I click Refresh? The following code returns the PNG in binary. <input type="submit" value="Refresh" id="refreshIssueHistory" /> <div id="theImageIssueHistory"> <% Html.RenderPartial("~/Views/Issue/Charts/IssueHistoryImg.ascx"); %></d...
Hi I been going through this tutorial and it looks really good. So I went through it and downloaded the sample file. I been playing around with it and I understand how to use it and was able to add my own validation too it. So I decided to add it to my current project I am working on. I was able to get it to compile and run yet whe...
I have a reasonably large project at work that I've inherited. It's an ASP.NET 2005 website project and two C# library projects for data access and some business logic. The code actually runs 6 different database driven websites. It displays different images and text for each site based on logic that examines the URL and uses a series...
We have a website which we recently migrated to ASP.NET MVC. All of the URLs are now different from the original website. Google still has all of our old URLs, so if anyone finds us in a search, currently they will get a 404. I have a catchall route that catches bad URLs, including all of the old ones. In a perfect world I would like...
Here's what I'd like to do. I have content that I am writing out to a view. This content has image references that are document relative. So for example, if I'm looking at the following URL: http://localhost/article/8AB98/ The content might have an image in the following form: <img src="myimage.png" /> This would obviously cause...
I'm struggling with Html.Checkbox in ASP.NET MVC. Imagine an Employee with a repeating group of Children: The "Add Child" button works fine, but I can't reliably use "Delete selected children". I render the checkboxes with this: <% int i = 0; %> <% foreach (var item in Model.Children) { %> <tr> <td> <%=Html.C...
Hi I read on the site that version 0.8 of xVal supports "Support for comparison validators (e.g., “PasswordConfirm” must equal “Password”)" Yet I see no tutorial on how to do this. I am trying to compare 2 passwords yet don't even know where to start. Can someone show me how to do this? ...
i am converting over a website and using the same .css files. its really strange as the site looks slightly different in terms of formatting (font sizes, padding, spacing, etc . ) does this make any sense because i am using the same stylesheets. is there anything that asp.net webforms was doing that was magic. i am reviewing the act...
i am migrating a website from asp.net to asp.net mvc in the asp.net site there are many places where they have "literal" tags and the server generates a bunch of html and sticks in in the literal tag. what is the equivalent of doign this in asp.net mvc. Should i shove this in ViewData? ...
I have an ASP.NET MVC application that currently uses the WebClient class to make a simple call to an external web service from within a controller action. Currently I am using the DownloadString method, which runs synchronously. I have run into issues where the external web service is unresponsive, which results in my entire ASP.NET ap...
In a view in ASP.NET MVC I can access the profile and profile members like this: <%= Profile.Name %> - <%= Profile.Karma %> but how do I get the Profile variable populated? It seems to be in HttpContext.Current.Profile. I've wrote a custom Profile class with a CurrentUser method that looks like this: static public Profile CurrentUser...
Hi I am not sure what I am doing wrong I am using the Jquery.Validate plugin and it has a remote field so I did this $("#mainForm").validate( { rules: { UserName: { required: true ,remote: "Test" } ,messages: { UserName:...
Hello, I understand that with jEditable (http://www.appelsiini.net/projects/jeditable) you can do in-place editing and POST the changed information to a URL. My ASP.NET MVC view is displaying a bunch of Model information which I'd like to make in-place editable. Currently, I have two views - one text representation and one edit view in...
I'm trying to find a way for the website owner to be able to easily edit static html pages and inject them into the master view. I know I can do this with .ASCX files. I even have a route and controller that will inject an .ASCX whose name matches a parameter in the URL. But is there a way to do it with HTML files? For reference, th...
Hi I want to do membership in asp.net mvc. I am not talking about the one that comes with a asp.net mvc project. I am talking about a database that I have my own custom tables and the aspnet.db tables combined. I know how to do this in webforms and I have combined my tables with the membership stuff but when I try to add my custom rol...
Hi I keep getting this error System.Web.HttpException was unhandled by user code Message="Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster." Source="Sy...
I am new at MVC in Asp.Net and while i am reading about the MVC and it's benefits and why we use this architechure in Asp.Net i didn't know (or misunderstanding) why we use this concept in Asp.Net? but i read an article said that : WebForms was a bad model that only led people to develop poorly performing web applications.They were larg...
I want to be able to check the form inputs prior to launching a long running asynchronous task. Two approaches that come to mind: Check values on the Begin method and throw an exception? Post to a normal (synchronous method) which validates as per normal. redirects to the asynchonrous method if no errors found. Throwing an exceptio...