有条件地填写列表框。 [英] conditionally fill list box .

查看:80
本文介绍了有条件地填写列表框。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想根据条件填写列表框值。

在我的sql server表中有字段lot_sold(列表框),Auction_Date(文本框) ),注册号(ddl)

现在从Web表单用户首先根据此日期选择Auction_date,该拍卖日期的lot_sold将填入列表框批次(lot_code在该日期为多个)。 br />


我如何实现这一点请帮忙。

解决方案

看看AutoPostBack [ ^ ]和拍卖日期控件的OnChange。



基本上您需要附加到拍卖日期控制的OnChange事件,当更改时您只需要查询数据库并提取给定日期的详细信息并像往常一样填充你的列表框。



****编辑****

哦是的,当你在在OnChange事件中,您可以通过查看该控件的相应属性来访问您用于选择拍卖日期的控制值

hi
I want to fill list box values based on a condition.
in my sql server table there are fields lot_sold(list Box),Auction_Date(text box),registration no(ddl)
now from web form user first select Auction_date according to this date lot_sold for that Auction date are to be filled in list box lot (lot_code are multiple for that date).

how i achieve this please help.

解决方案

Look at AutoPostBack [^] and OnChange of your Auction Date control.

Basically you need to attach to the OnChange event of the Auction Date Control, when that changes you just need to query the database and pull out the details for the given date and populate your list box like you normally would.

**** EDIT ****
Oh yeah, when you are in your OnChange event you can access the value of what ever control you are using to select the auction date by looking at the corresponding property for that control


这篇关于有条件地填写列表框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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