[删除幼稚的txtspeak请求]如何绑定下拉列表 [英] [childish txtspeak begging removed] how to bind drop down list

查看:51
本文介绍了[删除幼稚的txtspeak请求]如何绑定下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个像这样的下拉列表:-

i have a drop down list like this:-

<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="AccessDataSource2"
    DataTextField="type" DataValueField="type" Style="z-index: 112; left: 90px; position: absolute;
    top: 33px">



我想在用户更新数据库后更新其信息
我已经尝试过此代码,但在关闭页面并重新打开后,下拉列表更新却没有任何作用,但是在没有任何作用的情况下:



and i want to update its information after a user updates the data base
already tries this codes nothing working after i close the page and reopen it the dropdownlist updates but during the working nothing:

this.AccessDataSource2.DataBind();
this.DropDownList1.DataBind();

推荐答案

您是否尝试过:(鉴于您的问题尚不完全清楚,请大猜一下.)

Have you tried: (Big guess given that your question is not entirely clear).

if (!IsPostBack)
{
    // code...
}


this.AccessDataSource2.DataBind();
this.DropDownList1.DataBind();


这篇关于[删除幼稚的txtspeak请求]如何绑定下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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