I had an argument with one of my friends who is an architect at a pretty large internet company. Basically he was saying that ASP.NET MVC is not for large-scale enterprise applications, that it is not as flexible as WebForms, and that an MVC app will be slower than a web forms app.
From my own experience working with MVC, I can say tha...
I am getting a "Microsoft JScript runtime error: 'Sys' is undefined" error on one of my pages in an MVC application when I attempt an AJAX call. The AJAX call is made from a partial view which is embedded in more than one page. It works fine on all of the pages except one. I have read posts pointing to the web.config file settings and...
We're using ASP.NET MVC and our action does this:
pull records from DB
mark records as downloaded
push zipped download to browser
Now the problem comes when the download doesn't complete for some reason - maybe the user clicks "Cancel" or IE pops up that download security bar. I'm wondering if there's an alternative solution.
Could...
Hello!
I have an ASP.NET MVC 1.0 front-end site that is working well, and features as part of it, a Dynamic Data section that I'm using as the back-end admin area for the site.
I haven't messed about too much with authentication yet, but this seems like quite a logical web-site design for any new .NET sites being put together these da...
I am trying to get NerdDinner to work, and having a bit of trouble.
I have quick watched at the point where the actionResult for index happens, and seen that the items from the dinnerRepository are on the right side of the asignment operator.
However it seems when I step through to the next line of the code, dinners, which is passed to...
I have two classes, for this example, that are partial classes against LINQ-to-SQL model classes.
public partial class Foo
{
public bool IsValid
{
get { return (GetRuleViolations().Count() == 0); }
}
public IEnumerable<RuleViolation> GetRuleViolations()
{
yield break;
}
partial void OnVal...
Here is my ajax call:
response = $.ajax({
type: "POST",
url: "/Row/getRowName",
dataType: "json",
data:({ currRow : rowName, offset : 5 }),
error:function(request){alert(request.statusText)},
success:function(result){alert(result)}
}).responseText;
I get I...
Say I called Index() from the HomeController which returns the view Index.aspx, can jquery ajax in javascript on Index.aspx call a method in another controller (ExternalController)?
$.ajax({
type: "POST",
url: "/Home/sayHi",
dataType: "json",
data:({ currRow : centerPost[0], offset : ((-1 ...
This is a very basic question. I feel kind of silly asking about it but I'm kind of stuck and hopefully some here can save me some time. So I open VS2008 go to file new ASP.NET MVC Web Application and click ok. I choose to create the test project. I hit F5 to debug my new MVC project. Then I choose to modify the Web.Config file to e...
In my View I have:
<%
foreach (Personas p in Model.Personas) {
if (p.DisType == DisType.TextArea) {
%>
<% Html.RenderPartial("~/Views/Shared/Controls/Custom/xxx/Textbox.ascx", p); %>
<%
}
}
%>
First I'm not sure that I have the <% %> right.
Second, in my Partial View Textbox.ascx, I strongly typed it also to ...
Hi,
How do I serialize entity framework object into JavaScript Object (JSON)? I tried using JSON.NET but I am getting the following exception when I try to serialize it.
Exception: Newtonsoft.Json.JsonSerializationException, Message="Self referencing loop"
Hitesh
...
Hello SO Gurus,
As far as I know, ASP.NET MVC leverages a lot of the features of ASP.NET Web Forms, one of these services is how to get the Html response from the template .aspx file (the view). Can asp.net mvc leverages any other platform to generate html over template files (something like PHP for example)?
EDIT: There is NO use case ...
I have the following problem:
I have a form in site/banen (currently local running webserver) which is using a SQL database. The link is made using ADO.net and is instantiated in the controller in the following way:
DBModelEntities _entities;
_entities = new DBModelEntities(); // this part is in the constructor of the controller.
Ne...
In my ASP.NET MVC project, I have a polymorphic collection that I wish to render - say, an IEnumerable<ISomething> where the individual items may be a mix of different implementations of ISomething.
I'd like that list rendered, where each concrete type renders according to its own template (perhaps a strongly typed ViewUserControl).
In...
I am writing an HTMLHelper but I need to access User.Identity.Name, how do I do that?
...
how can i make asp.net mvc show a nice 500 error message? currently it is tells me that it could not find some view.
...
I have a Menu class that has a IQueryable property called WebPages. In the following statement I am returning Menu items based on a match but I need to include the Webpages property. Here is what I have at the moment.
var allCategories = Menu.All().Where(x => x.CategoryID == 4 && x.Visible)
I need to extend it to check a property in t...
I wrote a web application using ASP .Net MVC. One of the application's function is to return a list of objects, using json, to the webpage. However these objects are of different types. How can I determine the types of these objects using javascript?
...
I am writing web application I am not sure what is the correct response to unauthorized request. For user it is convenient when server response with 302 and redirects him to login page. However somewhere deep inside I feel that 401 is more correct. I am also little afraid if the 302 cannot be misinterpreted by search engines.
So how do...
I would like to intercept the "<" character in the form field by a regex validator. I will describe the problem in 3 steps:
Step 1: When I try to submit a form with a field containing the "<" character, I get the "Potentially dangerous request..." - as expected in ASP.NET.
Step 2: To avoid ASP.NET's RequestValidation, I decorate my Upd...