Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 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)

 


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
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



All times are GMT -4. The time now is 02:43 AM.


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