<%@ 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 String) As String
Dim myappClass As New appClass
Return myappClass.rplBack(str)
End Function
End Class
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 String) As 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 String) As String
str = Replace(str, "<", "<")
str = Replace(str, ">", ">")
str = Replace(str, Chr(13) & Chr(10), "<br>")
str = Replace(str, " ", " ")
str = Replace(str, "'", "´")
Return str
End Function
'------------------------ ROLLBACK 排版 ---------
Function rplBack(ByVal str As String) As String
str = Replace(str, "<", "<")
str = Replace(str, ">", ">")
str = Replace(str, "<br>", Chr(13) & Chr(10))
str = Replace(str, " ", " ")
str = Replace(str, "´", "'")
rplBack = str
End Function
'------------------------ 去掉分号 ------
End Class
Public Class appClass
'''--------------------- 排 版 ----------------
Function rpl(ByVal str As String) As String
str = Replace(str, "<", "<")
str = Replace(str, ">", ">")
str = Replace(str, Chr(13) & Chr(10), "<br>")
str = Replace(str, " ", " ")
str = Replace(str, "'", "´")
Return str
End Function
'------------------------ ROLLBACK 排版 ---------
Function rplBack(ByVal str As String) As String
str = Replace(str, "<", "<")
str = Replace(str, ">", ">")
str = Replace(str, "<br>", Chr(13) & Chr(10))
str = Replace(str, " ", " ")
str = Replace(str, "´", "'")
rplBack = str
End Function
'------------------------ 去掉分号 ------
End Class