Forms Data Controls :: How To Save Multiple Selections For One 1 Item?

Feb 20, 2011

I'm storing details about clothing in a database, and I need to save multiple entries for colour. For example, a user selects a top, and then needs to select the colours red, black, white and blue from say a group of tick boxes. How should I store this infomation, and what web controls would I use to help the user make there selection?

View 10 Replies


Similar Messages:

Forms Data Controls :: Inserting Multiple Selections Into A Table?

Feb 3, 2010

Using SQL Server 2008, C#, .Net 3.5

I have two tables - Reports, Usage

Report table:
RId
RName
RGroup

Usage table:
UId
UUser

What I want to do is make a page that will list all the reports in the Reports table and have a checkbox next to each name. A user can check each report they use and when they click "submit" it will insert each ReportID into the Usage table.I'm guessing that I should use a GridView to display all the Reports?How would I make it so that the "submit" button would insert each "checked" record into the Usage table?

View 8 Replies

Data Controls :: Add CheckBoxes Inside ListView Control And Save Selections To Database?

Dec 4, 2012

i want to know how to add checkboxes in listview (e.g: Approve / Dissapprove) and save it to database. i need to submit today

here is my code:
 
For Each item In ListView2.Items
Dim chk1 As CheckBox = item.FindControl("CheckBox1")
Dim chk2 As CheckBox = item.FindControl("CheckBox2")

[Code]......

View 1 Replies

Data Controls :: Filter DataList Records Based On Multiple CheckBoxList Selections

Oct 20, 2013

My question is I have multiple Checkbox Lists and i want to compare it and Filter Datalist records on Checkbox list checked event.. (I want filtering something like [URL]
  
using System;
using System.Collections.Generic;
using System.Linq;

[Code]..... 

My problem is If first checkbox list is checked and user clicks on second checkbox list then i want to compare both checkboxes and populate result based on both checkboxes.

View 1 Replies

Web Forms :: Multiple Selections In DropDownList

Jan 23, 2013

how to do multiple selection in dropdownlist in asp.net

View 1 Replies

Web Forms :: How To Change Code To Multiple Selections

Jul 31, 2010

string lvStatus =
string.Empty;

if (ClbLeaveStatus.SelectedIndex == 0) [code]..

how to change this code to multiple selections

View 1 Replies

Web Forms :: Trying To Populate The Value (s) Of A Listbox That Has Multiple Selections?

Jan 20, 2010

I am trying to populate the value(s) of a listbox that has multiple selections:

Assignment Preference:<br />

<asp:ListBox ID="assignmentPreferenceList" SelectionMode="Multiple" runat="server">

<asp:ListItem Value="">None</asp:ListItem>

<asp:ListItem Value="CONTRACTING">CONTRACTING</asp:ListItem>

<asp:ListItem Value="DIRECT HIRE">DIRECT HIRE</asp:ListItem>

<asp:ListItem Value="CONTRACTING-DIRECT HIRE">CONTRACTING-DIRECT HIRE</asp:ListItem>

</asp:ListBox>

I am using a datareader in code behind to "loop" through the values:

string sql4 = "Select * from assignmentPref where tID=" + (dr["id"].ToString());

SqlCommand comm4 = new SqlCommand(sql4, con3);

SqlDataReader dr4 = comm4.ExecuteReader();

while (dr4.Read())

{

assignmentPreferenceList.SelectedValue = (dr["assignmentPref"].ToString());

}
Works great with 1 assignment preference but with 2 or 3 it craps out.

View 7 Replies

Web Forms :: List Box Multiple Selections Spacing

Apr 6, 2010

I have a web form that when completed sends an e-mail with the data from the form. I have a list box that permits muptiple selections and it post to the email with the following code.

sb.Append("<br />Products of Interest:....");
for(int i = 0; i < ListBox2.Items.Count;i++)
{
if(ListBox2.Items[i].Selected)
sb.Append(ListBox2.Items[i].Text);
}

It works fine except that when multiple tiems are selected, they run together on the form. Instead of "Beds Dressers Tables", I get "BedsDressersTables".

View 3 Replies

Web Forms :: How To Display CheckBoxes In DropDownList For Multiple Selections

Jun 20, 2013

How to display checkboxes in dropdownlist ?

Actually I want to select any checkbox(For selecting months) which is listed in dropdownlist? 

View 1 Replies

Data Controls :: Save Repeater Item Values To Database?

May 7, 2015

I am displaying data in html table using Repeater. And I have two button for each row. When I click 1st button I want to insert particular row and using second button the same row to be updated. But my prob is When i click button all row is inserting. And I am using Button click event for two button.

View 1 Replies

Web Forms :: Process Radio Buttons As 'group' Allowing For Multiple Selections?

Feb 25, 2011

the form has 15 items to choose with radio buttons, any number can be selected. I would like to process them as a 'group' so I can do something like loop thru them, checking if each one has been selected to build a list and also be saving them to a table row, etc but it seems all the designations as a list or group make it mutually exclusive. just looking for better coding than checking them with an if statement or similar so the question is if there is some way to designate the radio buttons as a group but no force the group to be mutually exclusive

View 4 Replies

Forms Data Controls :: How To Save And Retrieve Multiple Gridview Rows

May 13, 2010

I want to be able to select rows and save them for later display. I wish to store the data in a session object for viewing before i decide to save permanent in database.

View 4 Replies

Forms Data Controls :: Prevent Multiple Submits With A Dataview Item Updating?

Dec 14, 2010

I have a button in my dataview that drives the update:

<asp:Button ID="btnUpdate" runat="server" Text="Submit Bid" CommandName="Update"

View 6 Replies

Forms Data Controls :: Displaying Multiple Values In A Control In Item Template Field?

Aug 5, 2010

I have a doubt regarding displaying data in gridview. I have comma separated values in a particular field in my database. Will I be able to display the comma separated values from db table in a control in the Item template field of my gridview?

View 2 Replies

Forms Data Controls :: Image Upload In Gridview - Save Multiple Record Into Database

Feb 18, 2010

I have another problem is that I have Placed a file upload control in Empty template of Gridview to have multiple record insert. I have used viewstate to save multiple record into database. But problem is that I am able to find the control but it not giving any value.I have following code.

[Code]....

in above code

[Code]....

View 2 Replies

C# - How To Get Multiple Selections From .NET CheckBoxs

Feb 1, 2011

This seems like it should be prettty easy - but I just can't get it to work!I have an enum in my model, which I want to display as a list of checkboxes. The user can select multiple checkboxes, and I want to save this in the database.

So the enum is like so (approx 20 elements unabridged):

public enum ReferrerType
{
[Description("No Data")]
NoData = 9999,[code]....

And it doesn't work! I guess I'm missing something obvious, but I can't work out what. There are no errors - just an empty database table where referrers should be.

View 2 Replies

JQuery UI Autocomplete For Multiple Key/value Selections In .NET?

Jul 27, 2010

How do I handle selection of multiple items with autocomplete? The objects I return from my JSON web service contain an ID and a Label - the ID is the ID of the entity in the database, and the Label is some text to display for the user.

At the moment, when I select an item in the autocomplete dropdown, the value of the item's ID is stored in a hidden field, and the label is displayed. When I remove the label, I clear the ID of the hidden field - this is done by adding an anchor element to the DOM that handles this.

Now, I want to have multiple selections. I want to be able to enter some text, get an autocomplete dropdown, select an item and some other options, then be able to click an 'Add New' button or the likes to be able to select another instance.

For example, I'd type in a person's name and get an autocomplete selection. I'd select a person, and then enter their age, and click 'Add'. The person's id, name, and age will be stored somewhere so that I can retrieve it on the server side when I post back.

I'm not quite sure how to do it? I'm thinking of a hidden field - I assume that many hidden fields of the same name/id turn up on the server side as an array, which I can then use. But I haven't tried this yet in ASP.NET.

View 1 Replies

AJAX :: Multiple Selections In A Dropdown Control ?

Jul 23, 2010

I have a requirement to allow users select multiple "Agencies" and populate the "Types" based on that selection. Cascading Drop down would have been a great fit if there is no mutliple selection involved. I am wondering if I could use a popup dropdown with chekcboxes. However, these checkboxes need to be populated dynamically by a web service. I am not very familiar with AJAX toolkit and what control would work best in this case.

View 1 Replies

Forms Data Controls :: How To Process Checkbox Selections In A Datagrid

Jul 18, 2010

I have a datagrid which retrieves particular columns from an SQL database table. I also have a checkbox appended on to each row, so that selections can be made against rows of the users choice (i.e. select photos to add to favorites).

How can I code this (in VB.NET) so that these checkboxes are processed sequentially? I have heard an "array" might be best for this, but don't know how to code it. Essentially, I want the VB.NET to look through the datagrid list and to process only those rows with checkboxes checked, by applying some SQL based on these selections.

View 3 Replies

Forms Data Controls :: Losing DropDown Selections After Insert?

Dec 30, 2010

I have a FormView that is used to insert records into a table. It is set to a default mode of insert. When I click a LinkButton it makes the FormView visible and populates a DropDown List control via code. When I click the Insert button, it inserts the record into the table but then the DropDown List selections disappear. How can I keep the selections so that I only have to fill it once?

View 3 Replies

AJAX :: Cascading Drop Down Based On Multiple Selections

May 14, 2010

Does anyone know if it is possible to have Cascading DropDown Lists which are based on the selected value of more than a single list. Example - I have four tables in a database as follows:

Product
PartA
PartB
PartC

The items in Product are made up by one record from each of the other three tables (PartA + PartB + PartC = Product). What I wish to do is have 3 Cascading DropDown lists which refer to the three individual parts which can be used to select items fromt he Product table.

The first two work no problem but when it comes to the third the list is condition on only items which have the selects of both the first two lists.

View 4 Replies

Using Checkbox In Template Column - Denying Multiple Selections?

Mar 11, 2011

I have the followingh scenario where I have a radgrid and inside it, I have a template column containing a check box:

[code]....

However, I only really want the user to be able to select one checkbox at a time.

Therefore, how to I go about ensuring that the any previous 'checks' are removed or stopping multiple checking altogether?

View 1 Replies

SQL Server :: Listbox Multiple Selections In Sql Insert Form?

Nov 11, 2010

New at SQL and ASP.NET C#, bear with me. I have a form to insert into mulitple tables of a sql db. The form includes two listbox's, categoryIDlistbox and subcategoryIDlistbox, both with the ability to select multiple choices. Idea is that there is one record for the user created (Table1) and then that user can have multiple categories and subcategories assign to him/her in Table2

Table1:
userID
fname
lname
etc...

Table2
userID
categoryID
subcategoryID

If I understand correctly I need to use an array to take the multiple listbox items and save them to the tables. Not sure where the array goes in my code behind page to process the listbox and loop for muliplte selections. Here's my current code behind, where do I place the listbox array?

[Code]....

View 4 Replies

Forms Data Controls :: How To Set Checkbox In Gridview For Maximum 'N' Number Of Selections

Aug 19, 2010

I have a gridview, in which i placed checkbox as Itemtemplate. My need is to restrict the user from selecting more than 'N' number of selections.

Eg: Gridview contains 50 records, that means 50 check boxes.

Max permitted selections: 10.

After the 10th checkbox selection, user should be prompted that..

"No more selections.. blah blah... "

Should i go for looping through records.. or is there any better way..

View 5 Replies

Data Controls :: Use Multiple Eval Fields In GridView Item Template

Apr 16, 2014

Iam using the below code in ASPX for displaying images that are present inside my website project folder

<a href=""><%# Eval("Columnname","Foldername/{0}") %></a>
eg:
<%# Eval("Gallery","ImageFolder/{0}") %>
Now my question is I want to call the foldername itself from database its column name is GalleryFolder
<%#Eval("GalleryFolder")%>

How to use eval inside another eval or is there any other options??

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved