asp.net-mvc

ASP.NET MVC Binding issue

Hi, I have an object with a property called "name". This object has a sub object that has a property called "name" as well. Transaction.name Transaction.TransactionItem TransactionItem.name I bind Transaction object to a partial control as usual: Html.TextBox("name", Model.name)%> Model is a Transaction object. And I bind Tran...

jqgrid sample using array data, what am I missing

Hello. I'm new in jqgrid, I'm just trying thes example to work. I have a html file only, nothing more. When I ran this file, array data is not showing. What am I missing here? Thanks in advance. <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jqGrid Demos</title> <link rel="stylesheet" ty...

Facebook Game Development - .NET - Which architecture?

I am starting to develop a facebook game using ASP.NET + Silverlight Which architecture would you use? ASP.NET MVC or MVVM or RIA Services? ALso what do you think about using XNA with Silversprite? The game won't be a arcade game. It will be more strategy/RPG. Thanks a lot in advance. ...

How to Correct & Improve the Design of this Code?

HI Guys, I've been working on a little experiement to see if I could create a helper method to serialize any of my types to any type of HTML tag I specify. I'm getting a NullReferenceException when _writer = _viewContext.Writer; is called in protected virtual void Dispose(bool disposing) {/*...*/} I think I'm at a point where it alm...

Can I convert a Stream object to a FileInfo object?

For the ExcelPackage constructor you need a FileInfo object. I rather use some kind of stream object(f.i. MemoryStream), because I don't need to save the file to the server itself, but expose it as a FileStream anyway to the user. I don't want to make files which I have to delete lateron from servers which are only there for generating p...

Hosting WCF Services in ASP.NET MVC Web Application

Hi! I have an ASP.NET MVC 1.0 webapp, which serves as a front-end site for our external API. More specifically, it has a Control Panel for our API clients, documentation, etc. Now I want to move our actual API (which is a set of WCF services) inside this project, so that, for example, http://api.example.com/controlpanel/dashboard would...

Model binding with nested child models and PartialViews in ASP.NET MVC

I have the following types and classes: { namespace MVC.Models public class Page { public EditableContent Content {get; set; } } public class EditableContent { public TemplateSection SidebarLeft {get; set; } public TemplateSection SidebarRight {get; set; } } } I want to edit...

ASP.NET MVC hosting problem, routing, handlers and modules

Hi, This is one of them again, hosting with fasthosts. I recently purchased a windows developer package from them. When I tried to deploy my ASP.NET 3.5 MVC project, which was working fine with the same host on a reseller account, it is not working. The reason to move from reseller to a normal Windows Developer package is, the MS-SQL...

MVC Localization of Default Model Binder

Hi, I am currently trying to figure out how to localize the error messages generated by MVC. Let me use the default model binder as an example, so I can explain the problem. Assuming I have a form, where a user enters thier age. The user then enters "ten" in to the form, but instead of getting the expected error of "Age must be be...

anybody has some dropdowns datepicker for asp.net mvc

anybody knows where can I find a html helper or something that is going to generate a datepicker composed from 3 dropdowns ? ...

How Could I Improve the Design of this HtmlHelper Extension?

Hi Folks note: I had originally posted a question similar to this here, but I decided to repost because I overcame the original issue and in the process, modified the design. I thought it warranted a new topic because as the design changed, the question fundamentally changed also. I just want to make it clear that I'm not trying to floo...

Any experiences using SharpDevelop to build an ASP.NET MVC app?

I've always used VS for .NET development, but am just wondering about the alternatives around now. I'm especially interested in use for ASP.NET MVC development. I'm not bothered about any of the visual design aspects of vs, but of course love intellisense and the debugging features. So, for anyone who has tried SharpDevelop when doing...

System.DirectoryServices.AccountManagement not working on the server

I am using System.DirectoryServices.AccountManagement to find the logged-in user's AD entry. It is working great in the VS2008 WebDev server on developers machines. But when we installed the code on the development server (windows server 2008), we get an access error. Both the developer's machine and the development server are membe...

is document view architecture same as MVC

Is MFC's document view architecture the same as MVC pattern or not ...

copy files between servers asp.net mvc

Hi, I am using asp.net, c#, MVC and nHibernate and I am trying to upload a file from a local machine to the server and replicate the file to the different server. I was able to upload file to the server and copy the file from one folder to the other folder on the same server without any problem.But how can I copy the file from one serve...

[asp.net mvc] Is there a new controller instance for each request?

Hi, I am just wondering, is there a new controller instance for each request? How does this actually work? I read something like that after an incoming request routing selects correct controller.. and I guess it creates a new instance of that and then the controller handles the request further. If that is so, what about actions redirecti...

ASP.NET MVC 2 client-side validation rules not being created

MVC isn't generating the client-side validation rules for my viewmodel. The HTML just contains this: <script type="text/javascript"> //<![CDATA[ if (!window.mvcClientValidationMetadata) { window.mvcClientValidationMetadata = []; } window.mvcClientValidationMetadata.push({"Fields":[],"FormId":"form0","ReplaceValidationSummary":false}); ...

In which controller do you put the CRUD for the child part of a relationship?

I am using ASP.Net MVC but this probably applies to all MVC patterns in general. My problem, for example I have companies and in each company I have a list of contacts. When I have selected a company I can see its details and a list of the contacts for that company. When I want to add a new contact for that company, should the implementa...

ASP.NET MVC pagination problem?

OK, This is starting to get mildly irritating. I tried to implement Twitter style paging using ASP.NET MVC and JQuery. My problem is that when not using Request.IsAjaxRequest() (for users with javascript turned off) it works fine, obviously posting back the whole page. When I run the code for Request.IsAjaxRequest(), it skips entries...

How can I set MAXLENGTH on input fields automatically?

I'm using ASP.NET MVC RC2. I have a set of classes that were auto-generated "Linq-to-SQL Classes", where each class models a table in my database. I have some default "edit" views that use the neat-o Html.TextBoxFor helper extension to render HTML input fields for the columns in a table. However, I notice that there is no MAXLENGTH attr...