checkboxes to query SQL database

I am currently working on a project for school.  This project involves using checkboxes to query data. I am using an arraylist to get the checkboxes that are selected and therefore perform the query.  My problem is I don't know a lot about arraylists and I am struggling with the code. I hope someone can help me with this.  All I need is a bit of a jump start with a code sample. Thanks.

0
j68349
9/8/2005 7:43:16 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

3 Replies
690 Views

Similar Articles

[PageSpeed] 44
Get it on Google Play
Get it on Apple App Store

Are your checkboxes in a datagrid, and are they databound to anything? Instead of an arraylist, you may want to consider using a loop to loop through all the checkboxes, and then fire an event every time it finds one that is checked. If you explain a bit more about what you are trying to do, I'll try to explain a bit more precisely.

smtraber


Victory is mine!!
0
smtraber
9/9/2005 7:53:30 AM

Essentially this is a project for school.  I have an assignment to develop an asp.net application using vb.net.  This application uses multiple checkboxes.  There are eight checkboxes.  They are as follows:  first name, last name, gender, hair color, weight, height, and hometown.  A user is supposed to check the one or more of the checkboxes and it will submit a query to the database listing those items checked from the database.  I have not databound any of my checkboxes, they are not in a datagrid, and I am using individual checkboxes.  Thanks for your help.

0
j68349
9/9/2005 3:20:37 PM
Reply:

Similar Artilces:

Submitting Web forms fields to sql database by clicking on SUBMIT FORM and sending the form fields to email box
I have a created or designed a form to be stored in a SQL database table and at the same time when a user clicks on SUBMIT button the form fields will automatically goto the visitor email address immediately. Also i have created a database with tables for each of this forms Pls help i have over 10 forms designed but the problem of submitting them to the table database and the user email address is the challenge now.... You ned to familiarise yourself with the basics of database access in ASP.NET.  There are free tutuorials here: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/da...

C#.NET WEB APPLICATION
hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

cancelling query initiated from web form, WAS 'Cancelling HUGE sql queries'
RE: http://archive.develooper.com/dbi-users@perl.org/msg08566.html http://archive.develooper.com/dbi-users@perl.org/msg08567.html It was suggested to capture the PID in order to kill any abandoned queries. This appears to work if the web server, web app, and database are all on the same machine. However, it doesn't seem so if the web server and database are on different machines. What we've noticed is that when we kill the web app PID, the database query process still remains active. Yet, when we directly kill the database query PID, the web app PID is automagically k...

Web Form to SQL Database
Hi all, I am very new to ASP.NET, Can someone please help me out on this matter. I simply need a brief example on how to insert textbox values, from a web form to an SQL database.  Any ideas? Hello tomcarbonese, t> Hi all, I am very new to ASP.NET, Can someone please help me out on t> this matter. I simply need a brief example on how to insert textbox t> values, from a web form to an SQL database. Read there detailed description http://asp.net/learn/data-access/#editinsertdeleteMichael Nemtsev | Microsoft MVP [.NET/C#] | .Net Tips & Tricks Publication It's ...

4 Layered Web Application for Inserting data into a database using sql server as the back end and a web form as the front end using C#
4 Layered Web Application for Inserting data into a database using sql server as the back end and a web form as the front end using C# . Can someone provide with code as I am new to this architecture and framework. Better send email. Thanks In Advance, A New Bie I suggest taking a look at the Time Tracker Starter Kit (v1.x or x2.0) or the Issue Tracker Starter Kit (v1.x).  Full source code is available.  Click on the Downloads tab above to find them.  These are not exactly what you are looking for, but perhaps they will help you get started.Terri MortonEngagement Manag...

querying a database using web forms
I am a website developer in Lincoln Nebraska. I have been given a task that involves an end user submitting a web form with checkboxes and radio buttons.  What the end user submits will be compared to a database and the results will be displayed in a datagrid.  For a little bit more backgroud:I have four checkboxes and two radiobuttons.  I have tried using an if...then loop as well as a case select loop but have not had any success with that.  I have also looked at msdn library and still have no idea where to start.  I am new to visual studio.net and asp.ne...

How to connect a sql database to a web form.
I am reletivaly new to .net programming. In your HTML; <body> <form id="Form1" method="get" runat="server"> <asp:DataGrid ID="myData" AutoGenerateColumns="True" Runat="server" /> </form> </body> In your code-behind page; protected System.Web.UI.WebControls.DataGrid myData; private void Page_Load(object sender, System.EventArgs e) { SqlConnection con = new SqlConnection("server=yourserver;database=NorthWind;uid=sa;pwd=;"); SqlDataAdapter da = new SqlDataAdapter("select * from employees", con); DataSet ds = new DataSet(); da.Fill(d...

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

SQL Query Question in my web form
Greetings! Is this a good SQL query to access two columns in my database and present this data in my web app? string DataBaseCommand = "Select UserName, [Password] from PatientDemographics Where UserName = '" + txtUserName.Text + "' && [Password] = '" + txtPassword.Text + "'"; Thank you,   EduardoThanks,Please Mark this post as answered if it was helpful. Hello,The query looks good but be aware of the SQL Injections.How To: Protect From SQL Injection in ASP.NET Regards ASP.NET Hosting (HostingFest) Hey thank you, b...

SQL query analyzer embedded in web form
Is there any way to embed a simple SQL query analyzer inside a web form? I need to provide a small text box where the user can run SELECT statements. Does anyone have a template I could use that would simplify the query analyzer: drop down lists with the name of the tables, attributes to use in the WHERE clause, etc... I am using C# to connect the web form with MS-SQL. Thank you...

Exporting SQL query results into Excel on a web form
So here's the deal... I have a web form (ASP.NET and VB.NET, created in Visual Web Developer 2005 Express Edition) that allows the user to search for records in a SQL 2000 database, and I need to be able to export those records into Excel. At this point the search results do not display on the page at all, and they don't need to - I just need for them to either be in an Excel spreadsheet that pops open, or to save as an Excel spreadsheet in a specified location. Or some other file type (XML?) that Excel can open is fine, too. As I have it right now, the query returns a...

How do I populate the edit fields on my web form from my SQL database?
Here's my scenario. When a user selects a record from my grid I open a web form in a new window for them to edit the data. I will be displaying the data in a number of textboxes and dropdowns. What's the best way to populate the fields? Is there a way I can bind all the controls to the database directly? Do I need to use a dataset and bind the controls to it? What's the best way (considering scale, etc)? I also want to open this form when the user clicks the "add new record" button with blank fields but I can write seperate code for that if necessary. I've never built a...

Transfering data from a web form into Sql server database
Hi I am trying to develop a web based application. I am trying to insert data from my web form into sql server database using stored procedures. I am having a problem while i try to exceute the command. The error given by system is System.InvalidCastException: Object must implement IConvertible. at System.Data.SqlClient.SqlCommand.ExecuteNonQueryany suggestion what am i missing?With Regards,Sameer Jindal We'd need to see the code in order to offer any suggestions.  Off the top of my head I'd take a wild guess and say you have a data type mismatch in one of your parameters.Terri Mort...

how to process web form and insert into sql database, into multiple tables
 HI All,I'm new to asp.net, coming from php. What I'm trying to do is process a web form that has a lot of variables (100) into stored procedures that insert into the appropriate tables in a sql database. The trouble that I'm experiencing is with method calls and variable scoping. The stored procedures are working as planned returning the new created projectID and reportID. Because I need to get the last record inserted on the first stored procedure for use in the second stored procedure I have InsertProject() set up to call InsertReport() from within a try block (line 64). ...

Web resources about - checkboxes to query SQL database - asp.net.web-forms

Quick Tip Friday: Create Checklists Faster with Auto-Checkboxes
/ We know a lot of Evernote users love checkboxes for to-dos, grocery lists, and more. Creating checkboxes in Evernote is easy: you can add them ...

Group sues Michigan secretary of state over citizenship checkboxes for voters
... rights coalition filed a federal lawsuit today in Detroit challenging Secretary of State Ruth Johnson’s decision to have U.S. citizenship checkboxes ...

Evernote for BlackBerry 10 updated with checkboxes, image and audio attachments
Evernote has updated its recently launched app for the BlackBerry 10 platform with new features, alongside speed improvements and two-step verification. ...

Add checkboxes to an Excel spreadsheet
Tgood37 asked the Answer Line forum how to add checkboxes to Excel spreadsheets, and how to make sure that checking a box will have an effect. ...

Solving Twitter and LinkedIn’s Ad Problem: It’s Time to Ditch the Checkboxes
Last week was a big one for social media giants Twitter and LinkedIn. They admitted to their investors and to the world that their display advertising ...

Simple trick for testing forms full of checkboxes with django
... testing style. What matters is that you have tests. Image via Wikipedia But what do you do when you want to test a form with a bunch of checkboxes? ...

Checkboxes that kill your product
Alexander Limi / Alex Limi : Checkboxes that kill your product — (To read this article with its formatting and typography intact, click here) ...

Evernote for BlackBerry 10 updated with checkboxes, image and audio attachments
... 10 platform with new features, alongside speed improvements and two-step verification. Among the new features is the ability to insert checkboxes ...

Bento for iPad for iPad on the iTunes App Store
Read reviews, get customer ratings, see screenshots, and learn more about Bento for iPad on the App Store. Download Bento for iPad and enjoy ...

Facebook Users in Brazil and India Can Syndicate Their Profiles to Orkut
Facebook users in Brazil and India can now connect their profiles with their account on Orkut , Google’s existing social network. Those who link ...

Resources last updated: 1/5/2016 5:09:00 PM