In the input box, enter fill + dynamic prompt information + drop-down selection, and in the input box, prompt information.
The input box can be filled in and can be selected in the drop-down list. A dynamic prompt is displayed when the input box is filled in.
Using System; using System. collections. generic; using System. linq; using System. web; using System. web. UI; using System. web. UI. webControls; public partial class Default2: System. web. UI. page {protected void Page_Load (object sender, EventArgs e) {if (IsPostBack) {} using (UsersDataContext con = new UsersDataContext () {string s = ""; int count = 0; List <Users> ulist = con. users. toList (); for (int I = 0; I <ulist. count; I ++) {if (count> 0) s + = ","; s + = ulist [I]. nickname; count ++;} HiddenField1.Value = s; // place the required information in the hidden control }}}
Background Data
<% @ Page Language = "C #" AutoEventWireup = "true" CodeFile = "Default2.aspx. cs" Inherits = "Default2" %> <! DOCTYPE html> Page display