473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

selection of value in listbox

samycbe
83
I am displaying i number of rows with 3 columns (1 sno 2 description 3 category) . the category is in listbox. and i am generating new row for the entry after display. S.No will be generated. Description will be typed by the user. in category list box i am displaying the existing categories. and i want to make last selected category (in row i) should be selected here. how to do it.

The following code is not working for me...

<option <% if rs2("category") = Request.Form("CboCategory"&i) then %> selected <%end if %> value ="<%=rs2("category")%>"> <%=rs2("category")%></option>

please help me....

samy
Aug 7 '07 #1
2 1392
shweta123
692 Expert 512MB
Hi,

Are you getting last selected value by comparing it with database value?
What Request.Form("CboCategory"&i) is for?




I am displaying i number of rows with 3 columns (1 sno 2 description 3 category) . the category is in listbox. and i am generating new row for the entry after display. S.No will be generated. Description will be typed by the user. in category list box i am displaying the existing categories. and i want to make last selected category (in row i) should be selected here. how to do it.

The following code is not working for me...

<option <% if rs2("category") = Request.Form("CboCategory"&i) then %> selected <%end if %> value ="<%=rs2("category")%>"> <%=rs2("category")%></option>

please help me....

samy
Aug 7 '07 #2
samycbe
83
i am displaying all the values in combo box from database and trying to check the last listed rows combo box value. But it is not working
Aug 7 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: middletree | last post by:
We have all seen those web pages which feature a multiple <select> box on the left, and an empty one on the right, and the user selects one or several options from the left box, clicks a button,...
18
by: booner | last post by:
I have a form that when it loads I would like to highlight the values (from a DB) that have been selected in a multiple selection list (<select multiple="true">. function onLoad() {...
8
by: Peter Bailey | last post by:
I have a form that allows the user to selct items from a listbox and combo box. how do I reset them ready for the next set of entries. I thought I would have a clear button. regards in...
2
by: (Pete Cresswell) | last post by:
Seems like I've been here before, but can't find anyting in Google. I've got two list boxes on a form. Seems to me like the inactive ListBox's selection rectangle should be something like...
2
by: DK | last post by:
Hello everybody ! I need little help from Your side. I have form called Form2, and ListBox called List 20. Property of List 20 allow multiple selection. Also I have query called Distribution as...
5
by: Lie | last post by:
Hi all, I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid. In Edit mode, I need to get back all...
3
by: Chris Kettenbach | last post by:
Hello all, Quick question. I have a listbox that is populated by items from a database. When the user select something from the list, I want to populate another listbox based on the selection in...
5
by: Dave H | last post by:
I have an asp:listbox, allowing multiple selections, is there a quick check to see if there's more than one selected, or do I need to go through the whole list? Thanks, Dave
10
by: Adam Clauss | last post by:
I have a page containing a list box. This list may contain duplicate items - in which the ORDER is important. ex: a b b a is significant as compared to: b
3
by: Jay Ruyle | last post by:
I'm trying to figure out a way to list several items in a listbox and let the user select any number of items in the listbox. I have tried to code in the items as bitwise items but all it stores...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.