Wrox Programmer Forums
|
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 12th, 2010, 05:08 PM
Authorized User
 
Join Date: Mar 2009
Posts: 68
Thanks: 6
Thanked 0 Times in 0 Posts
Default HTTP GET and HTTP POST

Thinking of implementing separate methods for Post and Get.

[Authorize(Roles = "Editor")]
[ValidateInput(false)]
publicActionResult EditArticle(int articleId, int? categoryId, string title, string summary, string body, string country, string state, string city, DateTime? releaseDate, DateTime? expireDate, bool? approved, bool? listed, bool? commentsEnabled, bool? onlyForMembers)

for Get

and

[AcceptVerbs(HttpVerbs.Post), Authorize(Roles = "Editor")]
[ValidateInput(false)]
publicActionResult EditArticle(int articleId, int? categoryId, string title, string summary, string body, string country, string state, string city, DateTime? releaseDate, DateTime? expireDate, bool? approved, bool? listed, bool? commentsEnabled, bool? onlyForMembers)

The Questions are will I need to set ValidationInput(true) or can I leave as is.

Also how should I handle this part of the code.

if (IsPostBack)
{
approved = approved ?? false;
listed = listed ?? false;
commentsEnabled = commentsEnabled ?? false;
onlyForMembers = onlyForMembers ?? false;
}

because I now know it is a post. Do I just remove the If(IsPostback)






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to do http GET/POST using socket? baburman C# 2005 4 May 19th, 2009 10:07 AM
HTTP post silver_scar C# 2005 0 July 31st, 2006 09:52 AM
HTTP POST/GET d_alchemist JSP Basics 1 April 24th, 2006 09:18 AM
HTTP-POST with C# jcascio ASP.NET 1.0 and 1.1 Professional 3 April 12th, 2004 01:15 PM
HTTP Post .Net sjlsysprg1 Pro VB.NET 2002/2003 5 June 26th, 2003 12:20 PM





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