Dropdownlist在bootstrap中丢失了值 [英] Dropdownlist lost value in bootstrap

查看:122
本文介绍了Dropdownlist在bootstrap中丢失了值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我在bootstrap div中的dropdownlist有很大问题。每当我从下拉列表中获得默认值时,单击同一div中的按钮以保存在数据库中。我从数据库中填写的下拉列表。有人有ide怎么修复?

解决方案

检查你是否在页面加载中将下拉列表的绑定放回回发中..

使用

  if (!IsPostBack()){ / *  您的代码绑定ddl * / } 



绑定下拉列表。


Hello
I have big problem with dropdownlist which is in bootstrap div. When I clicked button which is in the same div to save in database every time I have default value from dropdownlist. Dropdownlist I filled from database. Someone have ide how it fix?

解决方案

Check whether you have put the binding of Drop Down List within postback in page load..
use

if(!IsPostBack()) { /* your code to bind ddl */}


to bind the Drop Down List.


这篇关于Dropdownlist在bootstrap中丢失了值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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