Hi,
I need some help - I am trying to use a custom validation attribute in an ASP.NET MVC web project that needs to make a database call.
I have windsor successfully working for the controllers and the IRepository interface is injected normally. The problem arrises when I need to inject the repository into the attribute class.
The at...
I've seen a few blog posts and tutorials overviewing mixing in jQuery and the UI elements for Views in a .NET MVC web app. But usually targeted at developers with a comprehensive grasp of the full dev cycle and variations of back/middle tier technologies.
As the front end developer I'm pitching a jQuery-only UI to the back-end dev - he ...
Hi,
I'm trying to test some application logic that is dependent on the Values property in ControllerContext.RouteData.
So far I have
// Arrange
var httpContextMock = new Mock<HttpContextBase>(MockBehavior.Loose);
var controllerMock = new Mock<ControllerBase>(MockBehavior.Loose);
var routeDataMock = new Mock<RouteData>();
var want...
I'd like to collect statistical information, such as PageViews, Number of comments for each user, etc. I've thought about using the observer pattern. How would I implement this in ASP.NET MVC?
...
Ok I got a strange issue that I hope someone could help with
I have a MVC project based upon this demo
http://blogs.msdn.com/hammett/archive/2009/04/23/mef-and-asp-net-mvc-sample.aspx
However it has a problem when specifying a strongly typed view I get this error
Parser Error
Description: An error occurred during the parsing of a r...
In our ASP.NET MVC application, we've noticed that we cannot have The Forbidden DOS File NamesCOM1 through COM9, LPT1 through LPT9, CON, AUX, PRN, and NULanywhere in our routes. They inevitably result in IIS telling us the file cannot be found, even when we set routing not to check for the existence of files first. How can we work arou...
I am using Subsonic 3 (T4 template) to generate the models for my mvc app. However the default template does not allow for nullable columns, so when I go to save the record it errors out if a nullable datetime column is blank. (See this post...)
Question: What is the best practice to handle this?
Option 1: Change the template to ch...
This question is for someone who has read Professional ASP.NET MVC 1.0 (Scott Gu..) Chapter 7 AJAX. On page 286 they list the contents of the partial but do not show how to type it as IList
...
Main question: Is there a better way to accomplish creating a reusable control?
So the idea was to make a paging control to basically stop from having to keep typing out practically the same markup on multiple views. It's taking this:
<%= Html.ActionLink("First", "Details", new RouteValueDictionary(new { parentForumId = Model.TopicI...
I have an ASP.NET MVC application I'm building and I'm using a Master page. On this master page, I would like to further break things up by creating a separate file for "Tabs", "Header", and "Footer".
What kind of view should I create to encapsulate these things to help remove clutter from my Master Page? Also, how do I reference th...
How can I do something similar to Html.ActionLink() except place the generated link around an Image instead of just spitting out the link?
...
Reading the Oxite source code, I have found that validators save bad property name with some suffixes (RequiredError, MaxLengthExceededError, InvalidError, FormatError)
validationState.Errors.Add(CreateValidationError(user.Name, "Name.RequiredError", "Name is not set"));
validationState.Errors.Add(CreateValidationError(user.Name, "Name...
I need to create an ActionResult in an ASP.NET MVC application which has a .csv filetype.
I will provide a 'do not call' email list to my marketing partners and i want it to have a .csv extension in the filetype. Then it'll automatically open in Excel.
http://www.example.com/mailinglist/donotemaillist.csv?password=12334
I have succe...
bean id="foo" class="com.ems.samples.spring.Foo"
property name="bar" ref="bar"/
/bean
bean id="bar" class="com.ems.samples.spring.Bar"
public class Foo {
private Bar bar;
public String getMessage() {
return "Foo" + bar.getMessage();
}
public void setBar(Bar bar) {
this.bar = bar;
}
}
public clas...
I'm following this blog post to create an azure storage table:
http://blogs.msdn.com/jnak/archive/2008/10/28/walkthrough-simple-table-storage.aspx
It works fine on an asp.net webform web_role.
I've re-created the same project using asp.net mvc as the web role, and it's always failing on application start. this line:
StorageAccountInfo...
Hi!
I'd like to create an application using ASP.NET MVC, that should run under mono 2.4 (compiling will be done on a Windows box). Has anyone getting luck with this? Here is what I've already tried:
ASP.NET MVC on mono without any persistence model support, and using nhaml as the view engine
S#aml architecture, which is a quite good f...
I'm developing a website , job portal. I have 2-3 years of ASP.NET webform development experience,
I want to create a professional job portal site (to improve and learn more) but trying to decide on best architecture. Any suggestions or advice will help...
Thanks
...
I have this cute little progress bar looking thing in a dashboard page. Once it is started up, it updates itself every minute via ajax, javascript, blah, blah. Since some of my viewers are looking at it on older Blackberries, I normally figure out how big the bar should be for the initial rendering server-side, and draw the page accordin...
Hi
I have a login page. In my web.config I setup a loginUrl so that if a user tries to go to an "Authorized" page and are not authorized they will get redirected to the login page.
Now I noticed when this happens and the user gets redirected from a "Authorized" page the url from the page they are getting redirected from gets appended t...
Heading
I want to pass some variables from one page to another but I don't want them to appear in the URL. When I use a form to post the an ActionResult it works fine. However, when I do this
return RedirectToAction("Trackers",new{page = 1, orderby=desc});
I get the URL:
http://examplesite.com/Trackers?page=1&orderby=desc
Is ...