ASP 高级模板引擎实现类(4)


        Call ExecuteFunction
    End Sub

    ' ***************************************
    '    GridView
    ' ***************************************
    Private Function GridView(ByVal o_Content)
        Dim Matches, SubMatches, SubText
        Dim Attribute, Content
        Set Matches = GetMatch(o_Content, "\<" & TagName & "\:(\d+?)(.+?)\>([\s\S]+?)<\/" & TagName & "\:\1\>")
        If Matches.Count > 0 Then
            For Each SubMatches In Matches
                Attribute = SubMatches.SubMatches(1)     ' kocms
                Content = SubMatches.SubMatches(2)     ' <Columns>...</Columns>
                SubText = Process(Attribute, Content)     ' 返回所有过程执行后的结果
                o_Content = Replace(o_Content, SubMatches.value, "<" & SubText(2) & SubText(0) & ">" & SubText(1) & "</" & SubText(2) & ">", 1, -1, 1)                                            ' 替换标签变量
            Next
        End If
        Set Matches = Nothing
        If Len(ReplacePageStr(0)) > 0 Then                ' 判断是否标签变量有值,如果有就替换掉.
            o_Content = Replace(o_Content, ReplacePageStr(0), ReplacePageStr(1), 1, -1, 1)
            ReplacePageStr = Array("", "")                ' 替换后清空该数组变量
        End If
        GridView = o_Content
    End Function

    ' ***************************************

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2094.html