After reading Scott Gu's blog entry about the new Razor view engine for ASP.Net MVC and reading this question comparing the available view engines.
Razor seems to address most of the problems with the default view engine. What feature differences would make it a compelling choice for you as a developer? What features are lacking that ...
The latest version of the Entity Framework got me in love, still at good as it is I don't like using entities objects as domain objects for all the obvious headaches, so what I'm doing is translating retrieved entity objects in my services and returning POCOs to whomever consumes the service. Thanks to automapper the translation from poc...
This seems to be the only thing that works:
If a .cs file is inside App_Code...
And does not contain extension methods: set the build action to "Compile"; otherwise no other source code in the project knows of its existence.
And contains extension methods: set the build action to "None"; otherwise you get an error that the reference t...
Hi.
I got a problem with Entity Framework 4.0
I have a hierarchical table Category: Id, Name, ParentCategory_Id, timestamp
The "timestamp" field is marked as "Concurrency Mode" = "Fixed"
And I'm using Self-Tracking Entity "Category" to manage Category entity in my MVC application.
The situation:
I create STE "NewCategory",
set ...
In my controller I generated a SelectList that I pass to the dropdown helper:
<%= Html.DropDownList("abc123", Model.SomeList) %>
I look at the querystring for a value, which is a ID.
I then loop through all the items in the SelectList and if it is equal to the ID, I do:
item.Selected = true;
The controller action then passes thi...
I have a table of roles that has checkboxes with access or not. I need a help-button on the right most column that shows information for the role using JQuery Dialog. For some reason the dialog only shows every second time.
Below is the code I use:
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<%foreach (Role role in...
I am trying to change a value in a table from one view, and then redirect to another view using Flash FSCommand and Json, using the following code:
if (command == "nameClip") {
var url = '<%= Url.Action("Index", "Home") %>';
var clip = [args];
try {
$.post(url, { MovieName: cli...
Asp.net WebForms and MVC has a concept of Masterpages which make it easy to define a one time layout for all the page of your site. In Rails I'm struggling to find an equivalent usage pattern or feature.
From what I've read it's really easy to define a layout in every action with:
layout: 'viewname'
Now that seemed pretty ceremonial...
I am currently using this regex to get the page number from the url:
@"\/(\d+)$";
Which worked fine for urls like:
/some_category/2
/some_category2/323
My urls now have some additional querystring values (optionally), so the current regex is not working for these cases.
So now I need a regex to support:
/some_category/2
...
I'm decorated a ViewModel in my ASP.NET MVC 2 site with System.ComponentModel.DataAnnotations validation attributes. For one of my fields, named Price, I want to validate that the value is not below some extent, in this case 0.
I know that RangeAttribute exists for validation with a lower and an upper extent, but does something like a M...
In the project i am working on, i want to use the ADO.NET data services as data access layer. so that other parts of my application (except asp.net mvc web site) could also access it from the same location. I am just not sure if this si the correct model and also for asp.net mvc models I wanted to reuse the data services model, as much a...
I'd like to capture submit action from "Ajax.BeginForm (...)" and asynchronously fetch some data from controler and put it into some div...
How can i do it?
I've tried
Ajax.BeginForm(..., new AjaxOption( UpdateTriggerId = "", ) but as i noticed it is used for online checking form or something like this...
How can i disable reload wh...
.Net MVC application also running Linq-to-SQL.
I have seen many articles on grids that will operate in this environment but none that will capture data - all simply display and sort/order.
I need to dynamically add project codes as columns and have days of the week as rows. The individual cells will contain hours worked - yup this is ...
Hi
I'm using Moq to help in testing my ASP.NET MVC2 application.
Problem: ArgumentException was unhandled by user code. Unable to obtain public key for StrongNameKeyPair
This code has been adapted from Scott Hanselman's NerdDinner1.
HomeController CreateHomeControllerAs(string userName)
{
var mock = new Mock<Controller...
I develop a ASP MVC site, when I press F5 to debug, VS appear a notice error (as picture). If built solution, then debug, that error don't appear.
Plz help me fix this error
...
I am building an asp.net mvc web application.
Do I need to use captcha while user registration.
Because we make the user verify the email, by the standard way, like sending a link in the email and when the user clicks on the link, the email is verified.
Do you think bots can actually open an email and verify? And moreover the bots will...
Hi guys,
I'm using JUpload (http://jupload.sourceforge.net/) to process file uploading, as I need the possibility to select a folder and upload all the files within.
Well anyways, my problem is that with the same code, on the IIS7 file upload is working and with the Asp Net Development Server (of MS Visual Studio 2010) the upload will f...
Hi All,
I am getting following error
System.accessviolationexception Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
when accessing a method of external dll.
I have used this dll many other projects which also uses .net 3.5. This external dll uses method from another dll. All t...
We are looking on an implementation in which data is processed at client side. Need inputs on how to process the data in JSON or any other type at client side in ASP.Net MVC 2.0.
Details: Inputs are accepted from the user and required to be saved in a list (or any other object) at the client side. Once the user actions are complete, the...
does .net libraries give support for .zip uncompress operation?
...