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 > ASP.NET 4 General Discussion
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 Display Modes
  #1 (permalink)  
Old August 13th, 2011, 06:35 AM
Registered User
Points: 31, Level: 1
Points: 31, Level: 1 Points: 31, Level: 1 Points: 31, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old August 19th, 2011, 09:33 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
Reply With Quote
  #3 (permalink)  
Old August 21st, 2011, 06:16 AM
Registered User
Points: 31, Level: 1
Points: 31, Level: 1 Points: 31, Level: 1 Points: 31, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #4 (permalink)  
Old August 23rd, 2011, 02:50 PM
Registered User
Points: 31, Level: 1
Points: 31, Level: 1 Points: 31, Level: 1 Points: 31, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
Reply


Thread Tools
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
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 05: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 10:01 PM



All times are GMT -4. The time now is 08:21 PM.


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