Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 March 20th, 2006, 06:49 PM
Registered User
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 1.why to use tables 2.why to send viewstate

hello to the tech community here.
i m just a starter in asp.net.want to clear out some doubts.
so here follow some humble arguments.

1. i have never used such things like CSS or HTML.now when i tried my hands on asp.net using vs 2005, i was told by some that i shud use tables to adjust the controls/elements on the UI.But i observed same can be done without ever using tables.then why to use tables???

2. the viewstate is a field that is sent as coded string to the browser n comes back as it is. then why not to keep it on the server itself alongwith session information.

also if somebody can suggest some books/links for this.

hoping to hear back soon.

 
Old March 20th, 2006, 07:14 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Amit,
   First about tables, you dont have to use tables, it is merely one of the ways to layout an application (though it is becoming a bit outdated and is a little bit arcane), i would suggest using whatever you are most comfortable with using.

Your viewstate question is not one that can be answered in a few sentences but more or less it breaks down like this: HTTP is a stateless medium meaning that it has no way of telling what kind of infromation you entered into a web form, thats where ViewState comes in. When you post back a form to the server all of that data in the web form is stored to the viewstate and when the page is reloaded (unless you navigate away from the page) those values will be persisted. To answer your question: "why dont you just store it on the server" the reason is because it would consume resources! Imagine if you had 500 people accessing the same webform and all of that data was being saved to the server, whether or not it was ever actually processed, it would still be there. You can, however, disable viewstate and you are free to but it is more of a convience for a user if those values were persisted. (e.g. you have a lengthy form the person has to fill out, this misprint there phone number this causes your validation functions to go off and clears the webform, your user is going to be upset)

You can, however, enable session state to be served from a SQL Server, though that is really out of scope for this post.

As a Novice and even an intermediate programmer the web resources are vast when it comes to this topic:
www.asp.net
www.gotdotnet.com
www.4GuysFromRolla.com
www.sitepoint.com
www.dotnetjohn.com

Just to name a few. As you move up the metaphorical ladder and become a more experienced programmer you will find that topics relating to what you are doing will slim out some (In regards to the more advanced areas of .NET) this inevitably is what will either make you a "real programmer" or simply classifiy you as someone who goes to code project and just ripes source code, compiles, and goes. Best of luck to you.

"The one language all programmers understand is profanity."





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send URL request to send sms via NowSMS deco BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 February 16th, 2008 02:45 PM
ViewState Wervis C# 1 December 3rd, 2005 11:35 AM
Viewstate Wervis BOOK: ASP.NET Website Programming Problem-Design-Solution 0 November 30th, 2005 09:42 AM
ViewState abdul_owiusa General .NET 0 October 18th, 2005 04:37 PM
ViewState burhan ASP.NET 1.0 and 1.1 Basics 4 June 6th, 2004 04:25 AM





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