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

 

 ·新手问题    »显示摘要«
    摘要: 如果返回一个值? 比如sub aaa bbb=ccc end sub call aaa 如何取得bbb的值? 中间要添加点什么? ......
    摘要: 如题。。 ......


dropdownlist高手帮忙呀

在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   作者: hanlixing

你的page_load中不该再绑定了。


    摘要: 谢谢! ......
» 本期热门文章:

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