固定下拉列表中的第零个索引[asp.net] [英] fixed zeroth index in dropdown [asp.net]

查看:63
本文介绍了固定下拉列表中的第零个索引[asp.net]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i want 2 show dropdown on my web page with zero index fixed [select option]
as soon as user select items from a dropdown i want to do some code behind
on that index but dropdown zeroth index should remain intact

how can i achieve this?

推荐答案



您是否将下拉列表绑定在pagepostback中??

当您不使用以下代码在页面回发中将值绑定到下拉列表时,就会发生这种情况

if(!ispostback)
{
您用于binind dropdowndata的代码
}


are you bind the dropdown in the pagepostback???

It happens when you not bind values to dropdown in page postback use following code

if(!ispostback)
{
your code for binind the dropdowndata
}


这篇关于固定下拉列表中的第零个索引[asp.net]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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