c# - Set Height of a listbx fit to content -
I have to set a list box that shows data from the database column. Each time the length of the different data will be in the list-box. Therefore, according to this, I have to change its height to content. How is it
and asp: listbox id = "listbox1" runat = "server" backcolor = "white" height = "14000px" width = "1312px" & gt; & Lt; / Asp: listbox & gt; While (Dr. Reid ()) {string poem = dr [0] Toasting (); Byte [] newFileData = encoding. ASCII.GetBytes (poem); String fileString = System.Text.Encoding.UTF8.GetString (newFileData); String [] poem_details = fileString.Split (new string [] {"", "\ n"}, StringSplitOptions.None); Foreign currency (scores / different lines in the description) {ListBox1.Items.Add (line); }}
try it -
listbox rows = Listbox.Items.count
or
You can also set the following size -
$ (document) ) ADR ('Size', $ ('# & lt;% = this.ListBox1.ClientID% & gt; Option')) Length);});
Comments
Post a Comment