Rich Posted January 11, 2009 Report Share Posted January 11, 2009 For a static list box, the initial value can be readily set by using selected="selected" in . But I want to save 0ption value that the user selects and then make this the selected value the next time he goes to the server site. I can readily read and write from files on the server using ASP, but I do not how to get the retrieved value into the list menu as a default value. Can I avoid Recordsets, Dynamic List Boxes etc? Thanks for you help. Rich Quote Link to comment Share on other sites More sharing options...
administrator Posted January 11, 2009 Report Share Posted January 11, 2009 Can I avoid Recordsets, Dynamic List Boxes etc? Is this classic ASP you are talking about or ASP.net? If classic ASP, you can either: just manually set the default value in the HTML (may not be the best approach for nerd reasons .. but it works) or you can use a simple condition when populating the list box to filter for whatever default value you are looking for. ... It all depends on what the criteria is for the default selection. For ASP.net, I think you can just set that in the list box control. It has been many years since I use ASP.net, so my memory is weak on that one. Stefan Quote Link to comment Share on other sites More sharing options...
Rich Posted January 12, 2009 Author Report Share Posted January 12, 2009 Stefan: Thanks for your quick reply... I am using the ASP examples from w3Schools. My server does not run .ASPX, so I guess I cannot use ASP.NET. I am not sure what you mean by populating the list box... There seems to be no variable structure in basic HTML code to do this. However, I guess I could use ASP to write HTML code for all whole list. Is this what you had in mind? Sorry I am not more familiar with basic web design Rich Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.