asp.net-mvc

asp.net mvc: handling no-javascript

Hello, I'm working on a asp.net mvc2 app. I have been using jquery to do various different things in all of my views. They are work from a regular browser quite well. But I'm trying to figure out a good way to get the functionality working with browsers with javascript disabled (like mobile browsers). Is there a way to define a wh...

Stopping DotNetOpenAuth from redirecting the URL.

Whenever a call is made to a RelyingParty, DotNetOpenAuth gives a redirect (as expected). This looks something like this ... return request.RedirectingResponse.AsActionResult(); This works alright - but I'd like to catch it and put it in a dialog, not redirect the existing page. Is there any way to do this? I'm trying to use jQuery UI...

google search api for C#

Now that Google's discontinued their SOAP API, what can I use to search from C# code... I know they have an javascript ajax API, I've implemented it and it works, just need to do the same thing but from back end code. Thanks, Matt ...

Asp.net MVC CMS?

I want a free Asp.net MVC based CMS using which admin can easily edit pages. Like admin can edit pages on community.org and subsonic cms (asp.net web forms). Just mouse over the content, double click and can edit the page and save it. Dont want a huge CMS with a lot of useless functions. ...

How do you handle ajax requests when user is not authenticated?

How do you handle ajax requests when user is not authenticated? Someone enters the page, leaves room for an hour, returns, adds comment on the page that goes throuh ajax using jQuery ($.post). Since he is not authenticated, method return RedirectToRoute result (redirects to login page). What do you do with it? How do you handle it on c...

Which's the best way to protect primary key on ASP.NET MVC?

I'm creating a ASP.NET MVC website and I was wandering which techniques do you guys use to protect primary key on these mvc urls. Actually ASP.NET MVC generates this syntax for its urls: /Controller/Action/Id Last week I was trying to encrypt it using SHA-1 Encryption, but this encrypter generates some special symbols like + (plus), ...

How to setup IX webhosting for an ASP.net MVC procject.

IXwebhosting has stated that they do support this functionailty but when the project is uploaded you cannot access any of the pages other than the home page. Does anyone have a good guide of how to do this? ...

ASP.NET MVC 2 with NServiceBus unable to load requested types

I am trying to use NServiceBus with an ASP.NET MVC 2 website (using VS 2010 and the .NET 4.0 framework). However, when I run the site on my local machine, I get the following error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Here are the relevant steps I have ta...

How does asp.net MVC remember my incorrect values on postback?

This is working, but how??? I have a controller action for a post: [AcceptVerbs(HttpVerbs.Post )] public ActionResult Edit(Person person) { bool isvalid = ModelState.IsValid; etc. The Person object has a property BirthDate, type DateTime. When i enter some invalid data in the form, say 'blabla' which is obvious not a valid Date...

How can I support conditional validation of model properties

I currently have a form that I am building that needs to support two different versions. Each version might use a different subset of form fields. I have to do this to support two different clients, but I don't want to have entirely different controller actions for both. So, I am trying to come up with a way to use a strongly typed mo...

In My MVC Controller, Can I Add a Value to My HTML.DropDownList?

In my view I have an HTML DropDownList that is filled, in my controller, using a List<string>. <%= Html.DropDownList("ReportedIssue", (IEnumerable<SelectListItem>)ViewData["ReportedIssue"]) %> List<string> reportedIssue = new List<string>(); reportedIssue.Add("All"); reportedIssue.Add(...); ViewData["ReportedIssue"] = new SelectList(re...

Multi-step creation wizard using AJAX and JQuery

I'm in the process of redesigning a creation wizard in our ASP.NET MVC 2 application. Our current method is to have different pages for each step and navigate between them. While this works, it's a bit slow and annoying to navigate. I was looking to use JQuery and AJAX to make this feel a bit more dynamic and to also use client side va...

ASP.NET MVC does not add ModelError when invoking from unit test

I have a model item public class EntryInputModel { ... [Required(ErrorMessage = "Description is required.", AllowEmptyStrings = false)] public virtual string Description { get; set; } } and a controller action public ActionResult Add([Bind(Exclude = "Id")] EntryInputModel newEntry) { if (ModelState.IsValid) { ...

Implementation review for a MVC.NET app with custom membership

I'd like to hear if anyone sees any problems with how I implemented the security in this Oracle based MVC.NET app, either security issues, concurrency issues or scalability issues. First, I implemented a CustomOracleMembershipProvider to handle the database interface to the membership store. I implemented a custom Principal named User ...

Problem with insert Thai Language data to SQL Server 2008 field datatype text and show ????

Hello everyone I created MVC ASP.Net Web application and tried insert Thai language data to SQL Server 2008 database to field with data type text and then database store ?????? which is incorrect. For Html Page I user charset utf-8 However I tried to Encode string before insert data to database and change database field collation. Th...

Linq to Sql, Repositories, and Asp.Net MVC ViewData: How to remove redundancy?

Linq to SQL creates objects which are IQueryable and full of relations. Html Helpers require specific interface objects like IEnumerable<SelectListItem>. What I think could happen: Reuse the objects from Linq to SQL without all the baggage, i.e., return Pocos from the Linq to SQL objects without additional Domain Model classes? Extrac...

What ASP.NET MVC Route controls the appearance of hashes in URIs?

I have integrated a Silverlight Navigation Application in an ASP.NET MVC web. However when Silverlight calls for its default page, say, IndexPage ASP.NET MVC displays the route as: http://localhost/#/IndexPage I have tried to get ASP.NET MVC to respond to this route: http://localhost/#IndexPage but I am unable to find a configurati...

Refresh browser?

hello all, I am working with images and changing their sizes dynamically from the input I get from the user. when I change the size of the image first time it doesnot reflect the changes when I click the refresh the page using the browser button the change gets reflected and after that tere is no need to click the refresh button Pleas...

Help with jquery ajax posting and server-side validation messages

Anyone know of a working sample of jquery axax post with validation messages being returned from the server that highlight the relevant form fields? Should the form be a partial view? Is it possible to make use of modelstate? Cheers ...

User-friendly xml sensitization library that html encodes invalid parts of user submissions?

I would like to allow my users to submit a subset of xhtml that will be displayed to other users (likely I'll build a schema for it) but I want the server to handle validation more gracefully then hard rejecting invalid submissions. Instead I'd like the server to Html Encode invalid/harmful parts of the submissions (sanitize javascript a...