Hello,
I am tring to add data to a listbox in javascript, however the string building syntax has me stumped:
var yourobject = '<%=Model.Inserts['+ i + ']%>';
causes an error: "Too many characters in character literal"
All of the code:
var mlb = cm.createListBox('mylistbox', {
title: 'My list box',
...
I have a web application in which the user can configure reports (ASP.NET MVC, no Reporting Services or anything). The configuration is then represented as a JavaScript object which is sent to the server as JSON to retrieve data and actually generate the report. The submission HTML look similar to this:
<form method="post" action="/Rend...
So far all the XML / XSLT I've worked with takes an XML document and transforms it to a standalone HTML webpage using an XSLT file.
In my web application, I'm using a web service to retrieve the XML document, which I need to render and make human-readable, and then insert that formatted content into a content placeholder in my master pa...
I have an object which has a circular reference to another object. Given the relationship between these objects this is the right design.
To Illustrate
Machine => Customer => Machine
As is expected I run into an issue when I try to use Json to serialize a machine or customer object. What I am unsure of is how to resolve this issue as...
I created a ASP.NET project which calls a DAL class I wrote, to retrieve data to display on the page, most of the heavy lifting is in the DAL class.
As you can see, it pretty straightforward, although I do have some minor validation code in my aspx page.
Question here is that: how can I convert this project into a MVC pattern?
...
I have an ActionFilterAttribute which I want to accept parameters through but I can't figure out pass them across.
So my action filter looks like this;
public class PreventAction : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
filterContext.Result = new RedirectRe...
I'm using ASP.NET MVC2 RC and I have built security on top of the Areas/Controller/Action specification, using basically a table that tells the infrastructure which role has permission to execute which controller action.
The code I used to get the "area" was this
RouteData.Values["area"]
And then I checked that in the Database. My pr...
I'm having trouble with the JavaScript being emitted for client side validation when using Data Annotations on a model. Here's a sample of a model that works just fine with two required fields followed by the JavaScript that's emitted:
public class LoginUserViewModel
{
[Required(ErrorMessage = "Email required")]
pub...
I have an autocomplete field which I would like to augment by providing a drop down for categories as well, in the hopes that this makes it even easier to search on. This would take the category id from the drop down and then pass this in along with the search text to my server side Autocomplete Function.
I am using the jQuery autocompl...
My terminology is probably way off here but basically I'm trying to learn the ropes of ASP.NET MVC and so far so good (largely thanks to Phil Haack and Scott Hanselman's tutorials). One thing which I haven't seen addressed yet is the 'right' or most elegant way to pass multiple data models to a view. To help put the question in context, ...
I have a bunch of code in my old Web Forms app I'm migrating to MVC. There are sections of various pages that need to have HTML generated by the view and then regenerated by an AJAX call. A lot of this HTML is pretty complex, so it really helps to keep all of the html generation in one spot (preferrably a template).
My question is, is t...
I have migrated my MVC application to MVC 1 to MVC 2.
But I have added 2 project files, where one for MVC1 and another for MVC2.
web.config files has redirect assembly also.
In MVC2 its working fine. But when i try running on MVC 1 system it is refering MVC 2 only.
...
I just built an application using ASP.NET MVC. The programmers at my company want to build all future modules using n-Tiered (Presentation Layer, Business Logic Layer, Data Access Layer) architecture.
I am not the programmer and need to know why this makes sense? Do I have to completely rewrite the entire code or can it be converted...
I am just trying out Areas in ASP.NET MVC 2 and I've hit a small issue.
I've added the appropriate lines to my project file:
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
<PropertyGroup>
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
</PropertyGroup>
<CreateAreaManifest AreaName="$...
What's your list of blogs for anything asp.net and vb.net related. I know for instance Scott Gu's stuff is the first on the rank for asp.net.
I'm trying to compile a list of 'good' stuff that will teach me things as I read, the more I gather the better, this way I'll get several posts a day, as most blogs post only once a week if that.
...
Is there a built-in way of getting the full URL of an action?
I am looking for something like GetFullUrl("Action", "Controller") that would return something like http://www.fred.com/Controller/Action.
The reason I am looking for this is to avoid hardcoding URLs in automated emails that are generated so that the URLs can always be gener...
Hello, I'm using structuremap to register a service in the controller and i need to register repositories in services too. How I'll do that since they are 2 different projects and need the exact same IOC registration. Actually I'm using It on the presentation layer and injecting services in the controller.
I need to know a good pratice w...
I am having trouble with Crystal Reports when using charts and images which use CrystalImageHandler.aspx. The image cannot display and I suspect this is due to a problem with MVC routing.
The path image path is similar to this:
src="/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_a8301f51-26de-4869-be9f-c3c9ad9cc85e.png"
With...
Well guys, as described above I'm implementing a multi-tier architeture to work with WCF and Entity Framework 4 (with poco). Since I'm already have persistence ignorance with POCO I do need implement DTO or I can use WCF in its pure way.
The main quote is - I do need DTO to pass a lightwheight object in the network or I can use my POCO e...
I've got an app built using asp.net mvc and deployed over 2 Amazon EC2 instances. I'm using forms authentication to authenticate users. I simply make a quick look up on the given username and password and if I found a match I set an authentication cookie, like so:
if(_repository.Login(username, password))
FormsAuthentication.SetAut...