471,857 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,857 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 1274
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

Post your reply

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

Similar topics

3 posts views Thread by middletree | last post: by
18 posts views Thread by booner | last post: by
8 posts views Thread by Peter Bailey | last post: by
2 posts views Thread by DK | last post: by
3 posts views Thread by Chris Kettenbach | last post: by
5 posts views Thread by Dave H | last post: by

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.