zoukankan      html  css  js  c++  java
  • 页面中,绑定后台方法

    aspx:

       在repater中,

          <%#_TextType(CInt(Eval("FavoriteType")))%>      //显示的文本

        

     VB:

       Public Function _TextType(ByVal FavoriteType As Integer) As String
            Dim t As String
            If FavoriteType = 0 Then                      
                t = ""                                                  

            ElseIf FavoriteType = 1 Then
                t = ""
            Else
                t = ""
            End If
            Return t
        End Function

       t里面 可以在绑定的每一行前面,加上标识,比如:1 2 3,出租,出售,类型之类的,

      也可以添加到 A 标签中,跳转不同的连接

      <a href="<%#_Type( CInt(Eval("FavoriteType")),CInt(Eval("SourceID")) )%>"> 为每一行,根据类型,判断不同的链接

       根据自己的需要,写不同的方法进行绑定

     

  • 相关阅读:
    04_远程管理常用命令
    03_文件和目录常用命令
    02_Linux 终端命令格式
    01_常用 Linux 命令的基本使用
    test
    centOS 7 更改root密码
    安装 centos7
    1
    IO模型
    使用git连接到Github
  • 原文地址:https://www.cnblogs.com/lice/p/1915739.html
Copyright © 2011-2022 走看看