Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 28th, 2013, 01:34 PM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default The validation question.

Is it not your assertion that you make in the book that it is more preferable to validate user input from both the client side and then validate user input on the server side as well? This way (and I could be wrong here) according what is written in your book, if a user puts in bad data on the user input form, that it will be stopped before the form can post back to the server therefore not using up server and network bandwidth and allowing the user to correct anything before it is sent back to the server. Also if the user manages to get past client side validation to put in some kind of malicious information on the web form it will then be caught at the server and stopped there. Is that correct? Is that not the optimal form of validation that should be used on ASP.Net web forms?

Also I am just a little bit concerned in regards to the intelli-sense on the Javascript part of the application. It seems to me like sometimes the intelli-sense in the VS environment can maybe just a little bit spotty and not quite as robust when working with Javascript on the client side of things as it is in the code behind files. Sometimes it works and other times it goes missing in action, whereas in the code behind it seems to work just fine.
Also on your .ascx file, I noticed that there doesn't seem to be the opening and closing <Html> or even <body> tags that you would see on your typical web form. Is that just me or is that just by design? I am just a little bit confused about that.
Reply With Quote
  #2 (permalink)  
Old March 28th, 2013, 03:48 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

1) I always get confused by your double or triple negated questions, but I believe the answer is yes. As explained in the book, client side validation is just a courtesy to the user. Server side validation is the only real way to protect your data / server.

2) This is by design; JavaScript is not strongly typed, and code can can scattered across files, and does VS can't be as accurate as with C#. It gets better which each version.

3) Correct. As explained in the book, a user control is meant to be consumed in a web form or master page that already have these elements.

Cheers.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old March 28th, 2013, 04:31 PM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

3) Correct. As explained in the book, a user control is meant to be consumed in a web form or master page that already have these elements.


Oh yes I see it is just like partial page layout in MVC. As in a render section in a razor webview.
Reply With Quote
Reply


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
Chapter 9 - Validation question Rushino BOOK: Beginning ASP.NET 4 : in C# and VB 3 April 26th, 2010 03:47 AM
About a question with validation nealwang1019 XML 7 May 7th, 2009 03:52 PM
About a question with validation nealwang1019 BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 0 May 4th, 2009 10:58 AM
Validation Question mar0364 VBScript 8 July 26th, 2004 02:37 PM
Validation question savoym C# 2 July 19th, 2004 07:23 AM



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


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