在下拉列表中设置默认值是否在sql中提供数据 [英] Set default value in dropdown whether the data is available in sql

查看:65
本文介绍了在下拉列表中设置默认值是否在sql中提供数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在下拉列表中显示以下所有值。(表名 - tbl_typecode)

ID值

2冷

3温暖

4热门

5 Dead





在另一个表中数据存储如下



Id名称Typecode createdon

1 Raja 2 2015-07-01



我想显示下拉值但是默认选择的值是2



我怎样才能做到这一点。



请帮助

解决方案

绑定后设置SelectedValue。

Hi ,

Iam displaying all the below values in the dropdown.(table name - tbl_typecode)
ID values
2 Cold
3 Warm
4 Hot
5 Dead


In another table data is stored as below

Id name Typecode createdon
1 Raja 2 2015-07-01

I want to display the dropdown values but the default selected value is 2

How can I achieve this.

Please help

解决方案

After Bind Set the SelectedValue.


这篇关于在下拉列表中设置默认值是否在sql中提供数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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