Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 6 > BOOK: Professional C# 6 and .NET Core 1.0
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional C# 6 and .NET Core 1.0
This is the forum to discuss the Wrox book Professional C# 6 and .NET Core 1.0 by Christian Nagel; ISBN: 978-1-119-09660-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 6 and .NET Core 1.0 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 Display Modes
  #1 (permalink)  
Old December 22nd, 2016, 01:08 PM
Authorized User
Points: 66, Level: 1
Points: 66, Level: 1 Points: 66, Level: 1 Points: 66, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2016
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Default Chapt 40: pg.1240-1241 - Form Data

When I run this example through Chrome, the Browser is not rendering a Form, but the actual string that was returned from the GetForm() method:

<form method="post" action="form"><input type="text" name="text1" /><input type="submit" value="Submit" /></form>

Also, in the Encoding example (pg. 1239-1240) it returns the string instead of interpreting the JavaScript alert:

<script>alert("hacker");</script>
Reply With Quote
  #2 (permalink)  
Old December 22nd, 2016, 04:30 PM
Wrox Author
Points: 1,151, Level: 13
Points: 1,151, Level: 13 Points: 1,151, Level: 13 Points: 1,151, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Location: Austria
Posts: 171
Thanks: 2
Thanked 53 Times in 53 Posts
Default

Indeed, in this case Chrome behaves different to Microsoft Edge.

HTML5 defined (at least when I checked the specs) if a page is not completely defined (with missing html/head/body elements), the browser should automatically fill that. This spec might be changed with newer updates (I think I've seen this behavior with Chrome as well).
With today's versions, Microsoft Edge supports not complete pages and renders them, and Chrome does not.
For the moment, just try these samples with Microsoft Edge.
In the next few days I'll extend the samples to return complete HTML code instead of fragments.

Cheers,
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
Reply With Quote
  #3 (permalink)  
Old December 22nd, 2016, 04:47 PM
Wrox Author
Points: 1,151, Level: 13
Points: 1,151, Level: 13 Points: 1,151, Level: 13 Points: 1,151, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Location: Austria
Posts: 171
Thanks: 2
Thanked 53 Times in 53 Posts
Default

Now I also tried the page using Firefox, and it behaves as expected - similar to Microsoft Edge.
Anyway, I'll add complete HTML in the next few days to have it correctly rendered in Chrome as well.

Cheers,
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
Reply With Quote
  #4 (permalink)  
Old January 17th, 2017, 02:36 PM
Wrox Author
Points: 1,151, Level: 13
Points: 1,151, Level: 13 Points: 1,151, Level: 13 Points: 1,151, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Location: Austria
Posts: 171
Thanks: 2
Thanked 53 Times in 53 Posts
Default

added a HtmlHelper class that creates HTML doc-type and head to make it work with Chrome as well:https://github.com/ProfessionalCShar.../master/ASPNET
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
Reply With Quote
Reply


Thread Tools
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
pg 301... Connecting a data source problems... richv BOOK: Beginning SharePoint 2010 Development 1 September 2nd, 2010 05:16 AM
Error 40 prasanta2expert ASP.NET 1.x and 2.0 Application Design 1 December 6th, 2006 06:04 AM
Properties in Body Tag - Pg. 40/41 jabs BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 December 5th, 2006 09:12 AM
Chapt 9, Pg 227. Error? ericfields6483 BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 October 2nd, 2005 01:46 PM
CH3, pg 96 Hidden Form Fields wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 19 October 28th, 2003 03:18 PM



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


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