p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 13th, 2009, 01:39 PM
Authorized User
Points: 85, Level: 1
Points: 85, Level: 1 Points: 85, Level: 1 Points: 85, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2009
Posts: 20
Thanks: 7
Thanked 0 Times in 0 Posts
Default Why do we need to maintain "static" methods in the Article.cs?

Hi,

Can anybody please explain why do we need to have static methods ie
public static int InsertArticle()
public static List<Article> GetArticles()
public static int GetArticleCount(int CategoryID) etc?

And another one that is bothering me is that the logic is separated between two methods
suppose say, we have
public bool Delete() which in turn calls Article.DeleteArticle().
I was not able to understand the purpose of this approach? why can we not have a single method for deleting an article in the Article.cs?
Hope somebody helps me to clarify this.
Thank you!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old April 13th, 2009, 02:31 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,250, Level: 27
Points: 4,250, Level: 27 Points: 4,250, Level: 27 Points: 4,250, Level: 27
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 807
Thanks: 12
Thanked 140 Times in 140 Posts
Default

I actually answered a very similar question about a month ago in another forum. Rather than duplicate the answer here, I'll post the link to it and let you check it out for yourself.

http://forums.asp.net/t/1390937.aspx
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old April 13th, 2009, 02:44 PM
Authorized User
Points: 85, Level: 1
Points: 85, Level: 1 Points: 85, Level: 1 Points: 85, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2009
Posts: 20
Thanks: 7
Thanked 0 Times in 0 Posts
Default

Thanks Lee, Now I understand this better.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old April 13th, 2009, 02:55 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,250, Level: 27
Points: 4,250, Level: 27 Points: 4,250, Level: 27 Points: 4,250, Level: 27
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 807
Thanks: 12
Thanked 140 Times in 140 Posts
Default

You're welcome.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading a files general property of "Type of file" GregSivers Visual Basic 2008 Essentials 7 June 3rd, 2009 10:38 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 04:09 PM
Chapter-5 on Intents:ContactPickerTester does not show the button "Pick a Contact" sunilm12 BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 April 15th, 2009 12:55 PM
How to download Code in "Professional Active Server Page 3.0 " book. renjith0 All Other Wrox Books 2 April 2nd, 2009 06:06 AM
Message received by "FILE" adapter is suspended skindika Biztalk 0 February 2nd, 2009 07:06 PM



All times are GMT -4. The time now is 06:08 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc