zoukankan      html  css  js  c++  java
  • DropDownList怎样动态绑定数据库中的某一条数据

    用Ajax动态绑定数据库的数据:点击后台查看代码,编写代码如下

    if (!IsPostBack)
    {
      using (SnailTechDataContext con = new SnailTechDataContext())
      {
        DropDownList1.DataSource = con.Job.ToList();
        DropDownList1.DataTextField = "JobName";
        DropDownList1.DataValueField = "JobCode";
        DropDownList1.DataBind();
      }
    }

  • 相关阅读:
    ssh 远程命令
    POJ 2287
    POJ 2376
    hihoCoder1488
    POJ1854
    HDU 5510
    HDU 4352
    CodeForces 55D
    HDU 1517
    CodeForces 1200F
  • 原文地址:https://www.cnblogs.com/hcx999/p/6105977.html
Copyright © 2011-2022 走看看