如何维护下拉列表选定的项目 [英] How to maintain dropdownlist selected item

查看:79
本文介绍了如何维护下拉列表选定的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有嵌套的转发器,我有网络用户控制,



在网络用户控制中我有一个下拉列表na文本框。



如果用户在下拉列表中选择燃料,那么它不应该允许用户再次选择它作为燃料,

i意思是,只有燃料我想维持状态,用户不应该选择燃料多次

时间。



plzzz ......伙计们帮助我。





谢谢

Hi guys,

I have nested repeater in which i have web user control,

In web user control i have a dropdownlist n a textbox.

If user select fuel as in dropdownlist then it should not allow user to select it again as fuel,
i mean, only for fuel i want to maintain state, the user should not select fuel for multiple
time.

plzzz ... guys help me.


thanks

推荐答案

取一个Viewstate并将其命名为Fuel Count:



Take a Viewstate and name it as Fuel Count as:

 int i=0;
ViewState["FuelCount"] = i++;





检查我是否> 0然后显示您想要的消息你不能多次选择燃料。



Check if i>0 then display a message what ever your want that you cant select fuel multiple times.


这篇关于如何维护下拉列表选定的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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