Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET MVC 2
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET MVC 2
This is the forum to discuss the Wrox book Professional ASP.NET MVC 2 by Jon Galloway, Scott Hanselman, Phil Haack, Scott Guthrie, Rob Conery; ISBN: Professional ASP.NET MVC 2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 7th, 2010, 07:34 PM
Registered User
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default TryUpdateModel(object) not calling 'String.Trim()' on values!

Hi to all.
I've just bought this book and i'm finishing chapter 01.
I just noticed a thing:

When I create and/or edit a Dinner, all the values are stored on the DB filled with blankspaces at the end.
This is crashing my App, because on the method "IsHostedBy(String user)" it never returns true, because my login is "login" and it's stored "login "

So, How to avoid this?
  #2 (permalink)  
Old December 7th, 2010, 08:55 PM
Friend of Wrox
Points: 539, Level: 8
Points: 539, Level: 8 Points: 539, Level: 8 Points: 539, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2010
Location: Seattle
Posts: 106
Thanks: 1
Thanked 17 Times in 17 Posts
Default

See if the column in the table is nchar versus nvarchar.
  #3 (permalink)  
Old December 8th, 2010, 10:18 AM
Registered User
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot, the problem was this =D
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TryUpdateModel no longer saving edits ajameson BOOK: Professional ASP.NET MVC 2 15 January 25th, 2011 11:34 AM
trim a string to the first character jd_erd Access 2 May 6th, 2007 11:01 PM
Trim a string in VBA lryckman Access VBA 2 January 19th, 2007 08:39 AM
javascript string Trim() frunction kokuthanda VBScript 0 October 12th, 2006 02:45 AM
String.trim() mrfox BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 January 8th, 2006 12:23 AM



All times are GMT -4. The time now is 11:54 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.