zoukankan      html  css  js  c++  java
  • [学习]自定义 class 的建立与使用

    .aspx
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" Debug="true" %>
    <%Response.Write(appclass_rplback("调出数据库字段"))%>

    .vb

    Imports appClass

    Partial Class _Default
        Inherits System.Web.UI.Page

        Protected 
    Sub page_load(ByVal sender As Object, ByVal e As EventArgs)

        
    End Sub
        
    Function appclass_rplback(ByVal str As StringAs String

            
    Dim myappClass As New appClass 
            Return myappClass.rplBack(str) 
        
    End Function
    End Class

    App_Code 文件夹内的 appClass.vb 

    Imports Microsoft.VisualBasic

    Public Class appClass


        
    '''---------------------  排 版     ----------------
        Function rpl(ByVal str As StringAs String

            str 
    = Replace(str, "<""&lt;")
            str 
    = Replace(str, ">""&gt;")
            str 
    = Replace(str, Chr(13& Chr(10), "<br>")
            str 
    = Replace(str, " ""&nbsp;")
            str 
    = Replace(str, "'""&acute;")
            Return str
        
    End Function
        
    '------------------------ ROLLBACK 排版 ---------
        Function rplBack(ByVal str As StringAs String

            str 
    = Replace(str, "&lt;""<")
            str 
    = Replace(str, "&gt;"">")
            str 
    = Replace(str, "<br>"Chr(13& Chr(10))
            str 
    = Replace(str, "&nbsp;"" ")
            str 
    = Replace(str, "&acute;""'")
            rplBack 
    = str 

        
    End Function
        
    '------------------------ 去掉分号 ------
    End Class


  • 相关阅读:
    nginx配置
    day5 业务开发中较有用代码
    day4 Vue基础
    npm vue的一些命令
    day3 ES6基础
    python_矩阵的加法和乘法计算(包括矩阵的动态输入,纯列表实现不引入其他模块)
    python_利用元组实现剪刀石头布
    python_整型与IP地址的转换
    python_判断标识符的合法性
    python_生成随机数与列表排序
  • 原文地址:https://www.cnblogs.com/apiapia/p/1160682.html
Copyright © 2011-2022 走看看