使用asp.net中的索引值突出显示列表框项 [英] Highlight the Listbox item using index value in asp.net

查看:59
本文介绍了使用asp.net中的索引值突出显示列表框项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个列表框控件,值是在页面加载时加载的.
在该列表框中,我要突出显示页面加载时的第一个值.每次将加载不同的数据.我怎样才能做到这一点 .而且我不知道如何获取indexvalue

Hi all,
I have a listbox control the values are load in that at the time of pageload.
in that list box i want to highlight the first value at pageload. different data will be load at each time. how can i do that . and i dont know how to get indexvalue

推荐答案

在执行DataBind()
use listBox1.SelectedIndex = 0 after doing DataBind()


这篇关于使用asp.net中的索引值突出显示列表框项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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