Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:672375
More Search Options
RSS Available
Matching Posts
Re: UpdateFrom and Encoding
[quote user="slynch"] Sorry, what you ment was pretty obvious now that I think of it. You might want to consider adding something like this so it wont be replace if you update to the next drop of the MVCToolkit namespace System.Web.Mvc.BindingHelpers{ public static class CustomBindingHelperExtentions { public static void UpdateFrom( this object obj, NameValueCollection values, Expression < Func < string , string >> encoder, params string [] keys) { NameValueCollection encodedValues
Posted to
ASP.NET MVC
(Forum)
by
dmtr
on 12/14/2007
Re: UpdateFrom and Encoding
[quote user="slynch"] How the javascript getting into the form fields? [/quote] I just entered <script>alert('possible xss');</script> into input field
Posted to
ASP.NET MVC
(Forum)
by
dmtr
on 12/14/2007
Re: UpdateFrom and Encoding
I found an acceptable solution (for me :) ): In BindingHelpers.cs file of MVCToolkit solution I added some code to UpdateForm method (at line number 100)... ... string strValue = value as string ; if (strValue != null ) value = HttpUtility.HtmlEncode(strValue); ...
Posted to
ASP.NET MVC
(Forum)
by
dmtr
on 12/14/2007
UpdateFrom and Encoding
Hi, I installed MVCToolkit and played with tutorials. I tried to create some Product object (Linq To Sql) in an action method: But encoding for string values in Request.Form didn't happen and I successfully saved javascript code as product name :( [ControllerAction] public void CreateNew() { Product prod = new Product(); prod.UpdateFrom(Request.Form); northwind.AddProduct(prod); northwind.SubmitChanges(); ..... } What do I need to do to have encoding
Posted to
ASP.NET MVC
(Forum)
by
dmtr
on 12/14/2007
Filed under: UpdateFrom
Page 1 of 1 (4 items)
WindowsClient:
The (Near) Final Word on Multi-Monitor Taskbars for Windows 7 - Ultramon vs. DisplayFusion
WindowsClient:
Looking back at 2009, and forward to 2010
Silverlight:
Polling Video – A Viable sub-second alternative?
TechNet Edge:
Windows Server 2008 R2 Quick Look #2 - Active Directory Recycle Bin
Channel 10:
I'm a Windows 7 PC Themes
Channel 10:
24 Years of Windows Box Art
WindowsClient:
Silverlight tutorial: HOW TO build CommandLink Control in Silverlight with Expression Blend 3 and Behaviors
ASP.NET:
Converting an RGB Color To Hex With JavaScript
Silverlight:
Silverlight HVP Design – Configuration & Scenarios
Channel 9:
Channel 9 Live at PDC09: Day 3 Welcome
Channel 9:
Channel 9 Live at PDC09: TWoC9 Day 3
Channel 10:
Microsoft's Mobicast: Stiched Cell Streams
Channel 10:
Festive Bing
TechNet Edge:
How Microsoft Reduces Operational Risk through Business Continuity Management
Channel 9:
Jeffrey Van Gogh and Bart De Smet: Inside System.Interactive
WindowsClient:
Runtime Fault Injection using TestAPI
TechNet Edge:
TechNet Radio: Community Corner with John Weston (Episode 1)
TechNet Edge:
Windows Firestarter Events (Part 3 of 5): IE8 - Browse the Web in Style!
WindowsClient:
The year ahead, 2010.
TechNet Edge:
FOPE Policies Deep Dive Interview
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online