更新时间:2023-02-11 21:05:48
HI Narasiman
你可以这样做
创建一个隐藏字段
在aspx页面中
你可以在逗号分隔的字符串列表项
/ code>到隐藏字段。
HI Narasiman
you can do like this
create ahidden field
in the aspx page
and you can store thelist items
incomma separated string
to the hidden field.
for (int i = 0; i < ListBox1.Items.Count; i++)
{
hdnfld.Value += ListBox1.Items[i].Text + ",";
}
参考: http://***.com/questions/3957153/sending-listbox-selected-values-as-hidden-field-using-jquery [ ^ ]
检查答案2.
或
http://forums .asp.net / t / 1639129.aspx?Simple + Store + selectedindex + + Listbox + in + HiddenField + and + then + Return + to + that + value + on + Postback + [ ^ ]
这可能会有所帮助。
Refer:http://***.com/questions/3957153/sending-listbox-selected-values-as-hidden-field-using-jquery[^]
Check Answer 2.
OR
http://forums.asp.net/t/1639129.aspx?Simple+Store+selectedindex+of+Listbox+in+HiddenField+and+then+Return+to+that+value+on+Postback+[^]
This may help otherwise ask here.