当使用jquery填充列表框时,如何在服务器端获取asp.net列表框项目 [英] How to get asp.net Listbox items in server side when the listbox is populated with jquery

查看:83
本文介绍了当使用jquery填充列表框时,如何在服务器端获取asp.net列表框项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我是Shrikanth Thaduka,目前我在Asp.net C#项目上工作,在我的页面上,我有3个服务器端控件DrpCountry [Dropdownlist],LstPlayers [Listbox],LoadPlayers [Button],我的问题是我可以填充列表框-LstPlayers使用基于用户选择的国家/地区的jquery ...并且我正在尝试基于按钮上的列表框项生成报告-LoadPlayers单击事件..但是列表框项显示为空...可能是问题所在..

预先感谢..:-)

Hello,

I am Shrikanth Thaduka, currently i am working on Asp.net C# project where in my page i have 3 server side controls DrpCountry[Dropdownlist], LstPlayers [Listbox],LoadPlayers[Button] and my problem is like i am able to populate listbox -LstPlayers using jquery based on user selected country...and i am trying to generate report based on the listbox items on button - LoadPlayers click event.. but listbox items showing empty...what could be the problem..

Thanks in advance..:-)

推荐答案

就服务器而言,列表框为"为空,因为它仅填充在客户端上边.您需要将其包含在该按钮的回发中,或将其内容作为请求的一部分传递.
The list box ''is'' empty as far as the server is concerned, because it was only populated on the client side. You need to include it in the postback for that button, or pass its contents as part of the request.


这篇关于当使用jquery填充列表框时,如何在服务器端获取asp.net列表框项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆