asp读取文本内容
'**************************************************
'函数名:FSOFileRead
'作 用:使用FSO读取文件内容的函数
'参 数:filename ----文件名称
'返回值:文件内容
'**************************************************
function FSOFileRead(filename)
Dim objFSO,objCountFile,FiletempData
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objCountFile = objFSO.OpenTextFile(Server.MapPath(filename),1,True)
FSOFileRead = objCountFile.ReadAll
objCountFile.Close
Set objCountFile=Nothing
Set objFSO = Nothing
End Function
'**************************************************
'函数名:FSOlinedit
'作 用:使用FSO读取文件某一行的函数
'参 数:filename ----文件名称
' lineNum ----行数
'返回值:文件该行内容
'**************************************************
function FSOlinedit(filename,lineNum)
if linenum < 1 then exit function
dim fso,f,temparray,tempcnt
set fso = server.CreateObject("scripting.filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit function
set f = fso.opentextfile(server.mappath(filename),1)
if not f.AtEndofStream then
tempcnt = f.readall
f.close
set f = nothing
temparray = split(tempcnt,chr(13)&chr(10
相关文档:
<%
Response.Buffer = True
'一般情况下,当用户请求WEB服务器时,服务器把请求回复给客户端。在客户端,浏览器把缓存作为一种加快速度的策略,就是当请求时先检查缓存的情况,如果有就直接调缓存了,而不请求服务器了。
'在WEB程序设计中,有时为了防止重复的提交或者严格的次序等,必须让用户的数据立即在使用后就 ......
public static void SetTreeNode(System.Web.UI.WebControls.TreeView treeRolePopedom, string rolecode,out string errMsg)
{
int k = 0;
& ......
在 ASP .NET 的 AJAX 控件中 TabContainer 的 CSS 样式的编写具有一定的格式规范及命名规则,如下图:
具体的 CSS 样式的编写为:
.ajax_tab_menu .ajax__tab_header /*整体按钮底样式*/
{
font-family:宋体;
height:29px;
font-size:12px;
background:#181c1f repeat-x bottom;
}
.ajax_tab_menu .ajax__tab ......
在编程过程中,经常需要页面之间的传值;特别是中文传递的时候,经常出现乱码现象,很是郁闷。下面是我在网上找到的一些方法,供大家参考。
1.设置web.config文件。(没有用过)
<system.web>
......
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2 ......