zoukankan      html  css  js  c++  java
  • asp.net中用dropdownList实现查询功能代码

     string stype = ddlType.SelectedItem.Text;
                string strsql = "";
                switch (stype)
                {
                    case "学号":
                        strsql = "select * from tb_Student where StudentNum like '%" + txtKey.Text.Trim() + "%'";
                        BaseClass.BindDG(gvStuInfo, "ID", strsql, "stuinfo"); ;
                        break;
                    case "姓名":
                        strsql = "select * from tb_Student where StudentName like '%" + txtKey.Text.Trim() + "%'";
                        BaseClass.BindDG(gvStuInfo, "ID", strsql, "stuinfo");
                        break;
                }
  • 相关阅读:
    选择结构
    算法和流程图
    存储信息和信息运算
    计算机组成原理
    计算机硬件组装
    认识计算机硬件
    认识操作系统
    DOS简介
    计算机软件知识
    易企cms截取字段方法
  • 原文地址:https://www.cnblogs.com/QiuJL/p/4524307.html
Copyright © 2011-2022 走看看