当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·关于    »显示摘要«
    摘要: _set_new_handler设置的函数的作用域:线程、模块还是进程(thread or module or process)? ......
    摘要: 谢谢 ......


dorodownlist取值问题

在page_load中我这样写的:    
  Private   Sub   Page_Load(ByVal   sender   As   System.Object,   ByVal   e   As   System.EventArgs)   Handles   MyBase.Load  
                                If   Not   IsPostBack   Then  
                                Dim   myList     As   New   ArrayList()  
                                myList.Add("全部")  
                                myList.Add("焦点")  
                                  isfocus.DataSource   =   myList  
                                isfocus.DataBind()  
                        End   If  
    End   Sub  
  <asp:DropDownList   id="isfocus"   runat="server">  
    <asp:ListItem   Value="all">全部</asp:ListItem>  
    <asp:ListItem   Value="1">焦点</asp:ListItem>  
    </asp:DropDownList>  
  我是这样写的取dropdownlist中的值语句:focus=isfocus.selecteditem.value  
  我是想通过选取“焦点”字段而达到找到数据库中的1,但是取值时还是取到的是焦点   select   *   from   app_project   where   c_focus=focus   order   by   c_id   desc    
  我想要达到:select   *   from   app_project   where   c_focus=1   order   by   c_id   desc的效果。该怎么办呀????  
 

NO.1   作者: guoyan19811021

你写的好象没问题的  
  Private   Sub   Page_Load(ByVal   sender   As   System.Object,   ByVal   e   As   System.EventArgs)   Handles   MyBase.Load  
        If   Not   IsPostBack   Then  
                                isfocus.items.add(new   listitem("全部","all"))  
                                isfocus.items.add(new   listitem("焦点","l")  
                        End   If  
    End   Sub  
 

NO.2   作者: thetuxedo

no   need   to   databind,   you   already   explicitly   specify   the   values.


 ·如何格式化word中的特定单词    »显示摘要«
    摘要: 如何将word文档中所有的一个特定单词如‘word’设置成特定的格式如宋体、五号、粗体、蓝色字体。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE