Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 August 20th, 2012, 12:47 PM
Authorized User
Points: 84, Level: 1
Points: 84, Level: 1 Points: 84, Level: 1 Points: 84, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Question ASP.net and Web Surveys

I have created ASP.net webpages that will calculate vehicle emissions and other Greenhouse Gases based on survey results. I was able to create my pages after reading the Wrox Beginning ASP.net 4.0 and the Professional book as well. What I need to do now is figure out how to use ASP.net instead of classic ASP/ADO for the Survey aspect of the project. I need to be able to show running totals, and of course gather information using radio buttons, checkboxes, textareas, etc. I am missing the critical link on how to add data to a MS SQL database and validate before writing. Can someone direct me to some book or web site that can help me bridge this gap in my knowledge?
 
Old August 20th, 2012, 12:58 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You said you read Beginning ASP.NET 4. There's a whole chapter devoted to validation, and four of them are devoted to accessing a database. What part are you missing and what do you need more information on?

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!
 
Old August 20th, 2012, 02:52 PM
Authorized User
Points: 84, Level: 1
Points: 84, Level: 1 Points: 84, Level: 1 Points: 84, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Unhappy ASP.net and Web Surveys

Maybe it's just changing the way I think of surveys from Classic ASP to ASP.net and I can't make the distinction yet. Most of the examples in the book have pre-existing data that is being displayed or Grid examples are shown to display data and update based on the ADD/EDIT/DELETE model. In classic ASP I would create my MS SQL database table with all of the fields (Which I would assume I would still have to do for ASP.net). I would then have an Update_Info.asp page that I would create a session variable to hold the identity ID for the respondent the 1st time thru and it would also post/write the data from all of my ASP pages using a nifty For...each variable in Form... loop updating the record set values with an Update.rs command. My surveys are usually complicated with new variables that calculated along the way from the survey entries that must also be added to the SQL DB. I just can't seem to wrap my head around how to think of the data being added/updated page by page with ASP.net
 
Old August 22nd, 2012, 05:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You could still do today what you did in classic ASP. You could, client side or server side, generate input controls and then at the server after a postback loop through the items in Request.Form, finding the ones you need and use their values.

Alternativelly, you can create controls programmatically during Init as explained here and here and here.

Finally, you could look into ASP.NET MVC that lets you work much closer to the form and its controls, giving you a much more direct way to interact with them.

Hope this helps,

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!
 
Old September 18th, 2012, 12:28 AM
messyleon
Guest
 
Posts: n/a
Default Need to understand

You need to understand that native-managed interoperation has its limitations. For example, the native ASP has no idea what is a managed "SqlConnection" object. Therefore, you can expect simply types such as string to work, but not such complex objects. Click data source binding for more information
Received Infraction
 
Old September 20th, 2012, 01:43 AM
williamregal
Guest
 
Posts: n/a
Default Features

Votations is a free web based hosted survey software which offers all features needed to create and manage your online surveys in a quick and easy manner.
dapfor. com/en/net-suite/net-grid/tutorial/real-time-blotter
Received Infraction





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert classic ASP - Web API code to ASP.NET melvik ASP.NET 3.5 Professionals 0 February 24th, 2012 03:02 PM
how to use asp.net we user control on asp 3.0 web i_shahid Java Basics 2 January 8th, 2008 09:04 AM
using asp.net web user control in asp 3.0 App i_shahid Classic ASP Professional 0 January 8th, 2008 07:32 AM
Convert ASP web application to ASP.NET Steve777 ASP.NET 1.0 and 1.1 Basics 3 June 2nd, 2005 07:26 AM
New Reader Surveys Forum cwebb General Announcements 0 December 10th, 2003 01:53 PM





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