Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : 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 January 7th, 2013, 04:13 PM
Friend of Wrox
Points: 595, Level: 8
Points: 595, Level: 8 Points: 595, Level: 8 Points: 595, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
Default ch. 15 - Hand Coding Data Acess Code

Imar,

It seems that hand coding is the best option for implementing the Add/Edit page. It does mean more work, but like you said on p.561
Quote:
you do gain a lot of flexibliity and - when done right - you end up with a page that's a lot easier to maintain.
Just curious as to what's more common practice in real world applications...

Is it more common to use ready-made controls and use the AddEditReview.aspx implementation or is it more common to use hand-coding and use the AddEditReviewHandCoded.aspx implementation?


Thank you.
Venu
Reply With Quote
  #2 (permalink)  
Old January 8th, 2013, 03:59 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I don't have any hard figures, but I think both are common. For complex, professional type of pages I follow the hand coding pattern. For simpler sites, or demo-ware I use the built-in controls.

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 January 8th, 2013, 02:12 PM
Friend of Wrox
Points: 595, Level: 8
Points: 595, Level: 8 Points: 595, Level: 8 Points: 595, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
Default

Thank you..this makes sense :)

I guess for more complex pages, hand-coding would give you the greater flexibility that u would need, but add some extra work. For smaller sites and prototypes, using the built-in controls will allow you to speed up the development.

But I just want to make sure I understand this correctly...

Hand-coding means using the HTML table for defining the layout with basic asp.net controls such as textbox, dropdown, etc.. and not using the built-in databound/datasource contols such as ListView/sqldatasource? Is this correct?

Thanks.
Tulsi
Reply With Quote
  #4 (permalink)  
Old January 8th, 2013, 03:06 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Well, yes and no.

You don't *have* to use a table; it's just very convenient. In most modern web sites you'll see a CSS based layout in favor of tables for layout. For admin pages I don't care that much; that's why I used a table.

In addition, even in a hand coded page you can use the standard datasource and data bound controls. For example, for the Genre drop-down to create a review, you can use a LinqDataSource or any other data source to get the data from the database.

In other words; it's not black and white. You can mix concepts from either into the other.

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
  #5 (permalink)  
Old January 8th, 2013, 04:19 PM
Friend of Wrox
Points: 595, Level: 8
Points: 595, Level: 8 Points: 595, Level: 8 Points: 595, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
Default

Thank you. This was very helpful!

Tulsi
Reply With Quote
  #6 (permalink)  
Old January 10th, 2013, 02:36 PM
Friend of Wrox
Points: 595, Level: 8
Points: 595, Level: 8 Points: 595, Level: 8 Points: 595, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
Default

Hi Imar,

Sorry for coming back to this, but just wanted to make sure....

Is the master page (FrontEnd.Master) an example of a CSS based layout?

Thanks,
Tulsi
Reply With Quote
  #7 (permalink)  
Old January 11th, 2013, 03:45 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Yes, as it uses semantic elements and CSS for the layout; not tables to defined a fixed design....

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
The Following User Says Thank You to Imar For This Useful Post:
Tulsi (January 11th, 2013)
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
Binding dropdown list in code behind with hand coding sophia BOOK: Beginning ASP.NET 4 : in C# and VB 1 December 27th, 2011 05:10 PM
Hand Coding VS Data Wizards Bulldog BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 May 22nd, 2007 04:21 AM
Ch. 15 Add'l Code? gekkster99999 BOOK: Beginning ASP 3.0 0 February 1st, 2004 10:55 PM
Ch 15 login.asp code sirandre007 BOOK: Beginning ASP 3.0 1 January 3rd, 2004 07:11 AM



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


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