Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
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 13th, 2011, 06:35 AM
Registered User
 
Join Date: May 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Inserting data from user choice - advice please

Hi,

Please can I have some advice in order to do the following?

I'm trying to develop a football 'predictions' website for my friends where a user can choose a week from a drop down and then the fixtures for that week will appear. This would contain five columns: The home team, a drop down containing 0 to 10, the away team, another drop down containing 0 to 10 and then a 'banker' checkbox (which would double points if prediction was true).

I've put together the above but unfortunately I can't work out how to insert the choices made by the user into my db. I need to insert just the goals choices, the banker choices, (eventually the users' number) and each fixture ID from my fixtures table into my predictions table.

Thanks in advance,

Dave
 
Old August 19th, 2011, 09:33 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This is a fairly broad question with answers that vary depending on many things. What is the structure of your database? What mechanism are you using to write to the database (LINQ to SQL, calls using standard System.Data objects)? Are you using stored procedures?

What have you done so far? Have you gone through an introductory book that covers writing apps that handle data?
__________________
-Peter
compiledthoughts.com
twitter/peterlanoie
 
Old August 21st, 2011, 06:16 AM
Registered User
 
Join Date: May 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Inserting data from user choice - advice please

Hi,

I currently have the following tables: FixturesTable, GoalsTable, PredictionsTable, TeamsTable, WeekNoTable, SeasonTable, UserTable and HomePageText.

I managed to use the Entity Framework to bring back my home page text from a table but found it difficult to work out how to insert data using that so was then trying to use SqlDataSource. (Ideally EF as that is the future I believe).

Yes I'm trying to use Stored Procedures for everything and have these set up already in my db.

I've gone through the book "Beginning ASP.NET 4 in C# and VB" by Imar Spaanjaars (The code I'd like to learn is C#).

Thanks,

Dave
 
Old August 23rd, 2011, 02:50 PM
Registered User
 
Join Date: May 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Inserting data from user choice - advice please

I've had a minor breakthrough

Therefore this thread can be closed.

Dave





Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice please for previous user data Ossieboy ASP.NET 4 General Discussion 1 July 17th, 2011 04:45 AM
Compare User.Identity.Name with inserting value from other DataSource illuminati BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 December 11th, 2009 06:55 PM
Double Inserting in Listview after Refresh by user hans ASP.NET 3.5 Basics 3 June 9th, 2009 11:02 AM
Inserting user_ID of logged in user frosty ASP.NET 2.0 Basics 3 July 28th, 2006 12:48 PM
Inserting data when data already exsist desireemm SQL Language 0 January 16th, 2006 11:01 PM





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