asp.net-mvc

Javascript not enabled

I have been developing web applications for a few years now. One of the issues that I face is having to develop web apps where javascript is not enabled or not available. I know this was a issue a few year back but am curious to know what other web designers, developers think about this issue? Is that still an issue? The reason I am a...

What I can expect from Visual web Developer 2010, a free tool ?

Hi, Just wanted to know that does Visual web Developer 2010 [Free tool] contains MVC framework? I want to learn asp.net MVC, this is the reason why I wanted to know that if Visual web Developer 2010 conatins asp.net MVC I can practice it their or is there anything new I can learn from Visual web Developer 2010 ? Might be you will see ...

ASP.NET MVC, Custom VirtualPathProvider and IIS6

Hi, I have implemented my own VirtualPathProvider for loading 'embedded' views. This works very well when running from Visual Studio, but I get the 'The view not found' message when running on IIS6. Is there anything missing in web.config, or could there be any other problem? I have added some logging and it seems that even though I r...

Asp.net MVC Markdown editor and Html.Encode

I might be mis-understanding here but from my understanding a markdown editor strips out all html. After then using a markdown.Transform() type of method this database stored markdown is converted into html with h1, p etc. With asp.net MVC the general rule is Html.Encode everything. But does this still apply when using a Markdown edit...

comments on selected text... admin functionality

Hi, I have scenario in which the end-user is presented with a paragraph of text. At the admin end, admin can select any portion of text out of that paragraph and attach some tag to it along with its description. At user's end, that paragraph is then shown as is, but highlighting that particular portion which admin had "tagged". Users ca...

ASP.NET MVC Image Button Inside HTML.BeginForm Problem

I am working on an ASP.NET MVC 2 portal. My requirement is something like below: <form action = "mvc2proj/ControllerName/ActionName/1234" method="post"> CheckBox 1 to select first item CheckBox 2 to select second item CheckBox 3 to select third item CheckBox 4 to select fourth item "Buy Now" image button </form> I am using H...

deploying asp.net MVC 1.0 app with HTTPS

We have an application built on ASP.NET MVC 1.0 which, once deployed, should be accessed with HTTPS. I tried few approaches for HTTPS but I have a few questions.: My home page does not need to be Secured (HTTPS), but rest of the hyperlinks following it will be Secured. I read about the action method attribute [requiresHTTPS] however I ...

Using System.ComponentModel.DisplayName with dynamic values?

Im trying to implement multi-language support in my system, the other systems at work uses xmlfiles for this generated from a database that they have used for some time now so they want me to use this aswell. I have managed to translate everything except the displaynames in my formmodels, these values can apperantly only be constant va...

Displaying friendly, localized enum values using DataAnnotations in ASP.NET MVC2

What's the recommended way to display localized enum properties in MVC2? If I have a model like this: public class MyModel { public MyEnum MyEnumValue { get; set; } } and a line in the view like this: <%: Html.DisplayFor(model => model.MyEnumValue) %> I was hoping to just annotate the enum values with DisplayAttribute like thi...

asp.net mvc invoke controller action from helper class

Hi All, As i understand asp.net mvc 2 allows use to invoke an action directly without mvc futures. so instaed of: <%Html.RenderAction we can use: <%Html.Action I'm using an Helper class to invoke the action but inside the helper class i cannot find the .Action attirbute: public static void CatalogList(this HtmlHelper helper...

MVC 2 UpdateModel - how does it work?

I ask because I cannot get this code to work. I get an exception; "The model of type 'ITOC.WebUI.Models.Contract' could not be updated." Which does not seem very helpful. ** EDIT ** The above exception has been resolved because of a spelling mistake in the prefix, a classic "Magic String". Now the problem is that NOTHING GETS UPDATED!...

ASP.NET MVC: Displaying images for subdomains

I'm working on an multi tenant app, so I have a lot of dynamic subdomains: user1.example.com user2.example.com etc It works great, but there's one problem though. Images are not displayed. <img src="/images/logo.png" /> Will display on example.com, but it won't work on user1.example.com I can of course use the following solution:...

Asp.Net MVC - Refresher Course

When MVC first came out, I was reading about it everyday and learning all I could about it. About the time MVC 2 RC2 came out, I stopped learning for various reasons (new house, new job, laziness). I now want to get back into MVC ... I have a half written blog that I want to finish, but I feel rusty when it comes to anything MVC. Can a...

Strongly typed user control model binding not working in Asp.Net MVC 2.0

I am using a strongly typed user control in one of the view. The coding is as follows: This is the call in my View: <table> <% for (int i = 0; i < ((List<string>)ViewData["MyProjects"]).Count; i++) { string viewIndex = "MyTasks" + i.ToString();%> <tr> <td> <%Html.RenderPartial("ProjectTas...

How to get TryUpdateModel to update a child object also in Asp.net MVC2

I have an object (Object1), which contains a child object (Child). Thus, you would access the child by Object1.Child. In my ASP.NET MVC2 project, I a receiving the POST reply to the create method. The FormCollection contains properties for both the Object1 and Child objects. I cannot seem to get the child object to be updated with th...

Do asp.net MVC 2 controllers auto sanitize the viewmodels for sql injection, or do I have to manually?

When a viewmodel is passed into the asp.net mvc controller, are the inputs automatically sanitized against sql injection, or do I have to sanitize each property on my viewmodel with something like AntiXss.GetSafeHtml from the Microsoft Antixss library? I'm new to MVC, so I'm not familiar with all the behind the scenes things the asp.ne...

Adding Wordpress blog to an existing website

I have a website which is built on ASP.NET MVC and hosted on Windows server. Now I wanted to add a blog specifically wordpress blog. I wanted to add this blog at this particular address http://thedomain.com/blog (not like subdomain http://blog.thedomain.com) I have heard from someone it is good for search engines to host under http://th...

ASP.NET Request Validation Exception Even When Validation Is Disabled

...

Custom CMS - best solution for navigation mechanism through newly created pages.

I'm writing custom CMS using ASP MVC. I'd like to let users define their own pages (views). That pages structure should be then displayed in navigation menu. So basically I'm thinking about some kind of site-navigation mechanism, which I should choose for solving that problem. I was looking at ASP.NET Site Navigation. Because I'd lik...

Send fax from ASP.NET MVC application

Hi all, I am developing ASP.NET MVC application as a part of summer experience job from my college. I have a requirement where i need to implement a fax functionality. Because i am still student, and this is my first real application, i'm kinda confused how to make this function and what libraries should i use. Third party services (such...