By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,705 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,705 IT Pros & Developers. It's quick & easy.

selection of value in listbox

samycbe
P: 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
Share this Question
Share on Google+
2 Replies


shweta123
Expert 100+
P: 692
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
P: 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.