如何使用3个下拉列表自动更新值 [英] How to update values automatically by using 3 drop down lists

查看:97
本文介绍了如何使用3个下拉列表自动更新值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的demo.aspx页面中有3个下拉列表和一个文本框,这些是



类型(chit,投资,计划,emi)下拉列表

金额(1lac,2lac,3lac,4lac)下拉列表

NoOfMonths(12,24,36,48)

MonthlyPay(它应根据以上选择自动进行)文本框





i具有以上默认值即



类型金额NumberofMonths Monthlypay

Chit 1lac 12 9800

Chit 1Lac 24 5800

Chit 1Lac 36 4500

....

....

....

如果我连续选择(下拉), 1lac,12个月然后自动显示每月工资(文本框)是9800



你能建议我怎么做这个

解决方案

检查在ASP.Net中创建级联DropDownLists [ ^ ]

您将学习如何将数据加载到父下拉列表更改后的子下拉列表。

当最后一个下拉列表更改时,您可以根据数据库中先前下拉列表的选定值读取monthplay值,并将值设置为monthplay TextBox的Text属性

i have 3 drop down lists and one text box in my demo.aspx page those are

Type(chit,Investment,scheme,emi)drop down list
Amount(1lac,2lac,3lac,4lac)drop down list
NoOfMonths(12,24,36,48)
MonthlyPay(it should come automatically based on above selection)textbox


i have the default values for above i.e

Type Amount NumberofMonths Monthlypay
Chit 1lac 12 9800
Chit 1Lac 24 5800
Chit 1Lac 36 4500
....
....
....
if i select (drop downs)continuously chit,1lac,12months then automatically show monthly pay(text box) is 9800

can you please suggest me how can i do this

解决方案

check Creating Cascading DropDownLists in ASP.Net[^]
you will learn how to load data to child dropdown list when parent dropdown list changed.
when last dropdown list changed you can read monthplay value based on selected values of previous dropdown lists from your database and set the value as Text property of monthplay TextBox


这篇关于如何使用3个下拉列表自动更新值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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