E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
MapPath
如何统计网站访问量,代码实现使用全局变量 Application,start,end,Session_start,Session_end事件
//在应用程序启动时运行的代码longtotalCount=0;//总访问数inttodayCount=0;//今天在线人数//先从XML中取得访问数stringxmlFilePath=Server.
MapPath
luofuxian
·
2020-08-21 04:23
asp.net
技术
点击链接弹出保存图片对话框(asp)
calldownload(server.
mappath
(".
CodingSir
·
2020-08-21 03:18
C#上传图片返回要保存的图片名
publicstaticvoidDelfile(stringsaveFilePath,stringimgPath){//删除原有图片stringpathname=System.Web.HttpContext.Current.Server.
MapPath
LMAOhuaNL
·
2020-08-20 22:45
C#
asp.Net
文件下载简单示例
publicvoidFileDownload2(){stringfileName="新建文件夹2.rar";//客户端保存的文件名stringfilePath=Server.
MapPath
("/App_Data
weixin_30619101
·
2020-08-20 19:49
删除指定路径下的文件
stringpathstr=System.Web.HttpContext.Current.Server.
MapPath
("/FilePath");if(Directory.Exists(pathstr)
weixin_30448603
·
2020-08-20 19:33
asp.net 获取网站根目录的方法
以下获取的都是文件的物理路劲,获取网站根目录的方法有几种如:Server.
MapPath
(Request.ServerVariables["PATH_INFO"])Server.
MapPath
("/
weixin_30869099
·
2020-08-19 04:24
XPATH 命名空间
XmlDocumentconfig=newXmlDocument();//读XML文件config.Load(HttpContext.Current.Server.
MapPath
("/web.sitemap
weixin_30451709
·
2020-08-19 04:48
获取网站根目录的方法有几种方法
获取网站根目录的方法有几种如:Server.
MapPath
(Request.ServerVariables["PATH_INFO"])Server.
MapPath
("/")Server.
MapPath
(
dengzhonggou6320
·
2020-08-19 00:49
C#解析XML详解(XPath以及带命名空间NameSpace)
_Click(objectsender,EventArgse){Label1.Text="";XmlDocumentdoc=newXmlDocument();stringxmlPath=Server.
MapPath
diehe5608
·
2020-08-19 00:23
把XML文件转换为字符串
xml文件是这样子的:刚开始转换时,使用下面的转换方法:DimobjDocAsNewXmlDocument()objDoc.Load(Server.
MapPath
("~/ImageLib
weixin_33965305
·
2020-08-18 22:29
“找不到类型或命名空间名称”的解决方法
今天在编译一项目的DAL层时在代码文件中增加了usingSystem.Web;,但在程序编译时遇到HttpContext.Current.Server.
MapPath
(ConfigurationSettings.AppSettings
zgmiao
·
2020-08-18 18:57
ASP.Net专栏
js和css文件自动在后缀处添加版本号(.NET)
先写一个获取文件名的公共方法:publicstringGetFileTimeStampString(stringfilePath){FileInfofi=newFileInfo(Server.
MapPath
Leckun
·
2020-08-18 18:02
C#
.Net
Web
Api
在windows应用程序中运行asp.net程序的下级目录问题
我得到了以下"提示":[3]Process...[4]
MapPath
(Strin
weixin_30600503
·
2020-08-18 17:04
关于WebRequest & SimpleWorkerRequest
protectedvoidButton1_Click(objectsender,EventArgse){FileStreamfs=newFileStream(Server.
MapPath
("~/tmp1
庚武讲堂
·
2020-08-18 16:33
根据rpt文件打印报表
=null){ReportDocumentrd=newReportDocument();rd.Load(this.Server.
MapPath
("\\Flow\\FlowForm\\rpt")+"\\"
weixin_34255793
·
2020-08-18 12:28
动态规划专项intermediate:UVa 10981
#include#include#include#includeusingnamespacestd;strings,t;mapdp;
mappath
;intdfs(stringst){if(dp
incredible_bly
·
2020-08-17 22:19
动态规划
asp.net后台接收app发送的图片
;intbytesRead=0;//将当前数据流写入服务器端文件夹upload下conststringsavePath="/upload/";//目标图片路径stringdirPath=Server.
MapPath
坚-持
·
2020-08-17 10:52
simple upload.aspx
//////stringpath=System.IO.Path.Combine(Server.
MapPath
("~/temp/"),"temp."
hankersyan
·
2020-08-17 05:43
.Net
ADO如何新增修改删除数据库的记录呢
将结果传回到rs1的recordset当中,ASP程式码如下:Setconn1=Server.CreateObject("ADODB.Connection")conn1.Open"DBQ="&Server.
MapPath
xergnvij
·
2020-08-17 03:18
ASP+上传文件语法
上传文件语法这里有一个怎样用ASP+上传文件的非常简单例子SubUploadBtn_Click(SenderasObject,EasEventArgs)UploadFile.PostedFile.SaveAs(Server.
MapPath
xergnvij
·
2020-08-17 03:18
ASP使用SQlite遇到的部分问题
这种方法比较简单,但是安全性较低);2.建立Sqlite链接,数据库文件目录有误,常见地址格式如下:DataBasePath=@"DataSource="+HttpContext.Current.Server.
MapPath
LOONGV
·
2020-08-17 02:54
Sqlite
ASP
Sqlite
ASP
.NET
指定的初始化字符串不符合ole db规定”错误的真相
大家都知道串这样写的时候代码:"Provider=Microsoft.Jet.OLEDB.4.0;DataSource="&Server.
MapPath
("..
cexosoft
·
2020-08-16 18:29
RSA 使用 xxx.pem文件 做公钥验密 私钥加密 的方法
=null){//merKeyFile=HttpContext.Current.Server.
MapPath
("/Bin/"
十年河东,十年河西,莫欺骚年穷
·
2020-08-16 16:40
加密公共类
C# NPOI Excel固定模板写入数据
导出数据触发:后台实现://Excel模板stringTempletFileName=context.Server.
MapPath
("....
@mT.沙海
·
2020-08-16 15:34
资料记录
excel
c#中teechart生成的图表导出
stringurl1=Server.
MapPath
("~//ChartImage//")+"chart1.jpg";stringurl2=Server.
MapPath
("~//ChartImage//"
jesland
·
2020-08-16 10:53
c#
后台管理数据库连接出错,请检查Conn.asp文件中的数据库参数设置的解决办法
server.CreateObject("ADODB.CONNECTION")conn.open"Provider=Microsoft.Jet.OLEDB.4.0;DataSource="&Server.
MapPath
叶振溪
·
2020-08-16 04:27
Hiwong
web窗口打印
一、打印Web窗本protectedvoidPage_Load(objectsender,EventArgse){stringpath=Server.
MapPath
(@"App_Data/TextFile.txt
zerolsy
·
2020-08-14 12:49
web
webbrowser
button
object
input
javascript
asp.net 获取当前目录...
System.IO.Path.GetDirectoryName(Page.Request.PhysicalPath)方法二:stringsPath=System.Web.HttpContext.Current.Request.
MapPath
LiloZhu
·
2020-08-14 00:31
ASP.NET
后台上传BIM模型-模型添加-格式转换-导入模型数据
){Om_modela=newOm_model();stringresult=string.Empty;try{stringuploadPath=HttpContext.Current.Server.
MapPath
身负千斤
·
2020-08-14 00:24
c#
BIM
C#删除指定文件
1根据该文件绝对路径进行删除//返回与指定虚拟路径相对应的物理路径即绝对路径stringfilePath=Server.
MapPath
("/bs/assets/img/tm.jpg");//删除该文件System.IO.File.Delete
yongye_
·
2020-08-13 23:56
.Net
Core
ASP.NET——C#文件夹创建与文件存在判断
if(Directory.Exists(Server.
MapPath
("~/upimg/hufu"))==false)//如果不存在就创建file文件夹{Directory.CreateDirectory
gis_morningsun
·
2020-08-13 23:53
知识总结
C#中常用的经典文件操作方法
C#追加文件StreamWritersw=File.AppendText(Server.
MapPath
(".")
世界因你而小
·
2020-08-13 23:14
C#
.net 文件夹是否存在的判断
protectedvoidButton1_Click(objectsender,EventArgse){stringpath="";stringphysicsPath=Server.
MapPath
(Request.ApplicationPath
weixin_33690367
·
2020-08-13 21:43
Asp.Net判断文件是否存在
在上传文件时经常要判断文件夹是否存在,如果存在就上传文件,否则新建文件夹再上传文件判断语句为if(System.IO.Directory.Exists(Server.
MapPath
("file"))==
weixin_30920513
·
2020-08-13 21:06
ASP.NET获取各级目录Server.
MapPath
详解全
Server.
MapPath
("/")应用程序根目录所在的位置如C:\Inetpub\wwwroot\Server.
MapPath
("~/")表示当前应用级程序的目录,如果是根目录,就是根目录,如果是虚拟目录
tiemufeng1122
·
2020-08-13 19:41
C#
asp.net判断文件或文件夹是否存在
在上传文件时经常要判断文件夹是否存在,如果存在就上传文件,否则新建文件夹再上传文件判断语句为if(System.IO.Directory.Exists(Server.
MapPath
("file"))==
素年槿夏
·
2020-08-13 18:36
C#
asp.net
mvc
asp.net在网站根目录下创建文件夹
假设要在asp.net网站的根目录下建立文件夹hovertree,C#代码如下:stringm_keleyiFolderName=Server.
MapPath
("/hovertree");if(Directory.Exists
iteye_3264
·
2020-08-13 14:43
.NET
C# 获取物理路径,获取当前服务器程序的运行目录
也可以用(HttpContext.Current.)Request.
MapPath
();或者HostingEnvironment.
MapPath
("/Images/aa.jpg")函数stringdataDir
houyanhua1
·
2020-08-13 14:09
C#
上传文件时判断文件夹是否存在
在上传文件时经常要判断文件夹是否存在,如果存在就上传文件,否则新建文件夹再上传文件判断语句为if(System.IO.Directory.Exists(Server.
MapPath
("file"))==
fireswolfs
·
2020-08-13 14:27
公文套红方法,平时都很少用,只是在做公文处理的时候用到了,今天贴出来备用。...
//套红处理事件publicvoidlkbtnTaoHong_Click(objectsender,EventArgse){try{//模板文件objectstrTempFile=Server.
MapPath
dianguli3512
·
2020-08-13 13:11
C#判断文件和文件夹是否存在 不存在则创建
if(Directory.Exists(Server.
MapPath
(~/upimg/hufu))==false)//如果不存在就创建file文件夹{Directory.CreateDirectory(
weixin_30802171
·
2020-08-13 11:03
C#判断文件及文件夹是否存在并创建(C#判断文件夹存在)
判断文件及文件夹是否存在并创建(C#判断文件夹存在)protectedvoidButton1_Click(objectsender,EventArgse){if(Directory.Exists(Server.
MapPath
风口上的猪2015
·
2020-08-13 10:03
C#
.net 判断文件夹是否存在,创建文件夹
ispostback){stringTimePath=Server.
MapPath
(str).ToString()+"\\";//获取上传路径的物理地址if(!Dire
shi子
·
2020-08-13 10:53
C#
Server.
MapPath
- Physical path given, virtual path expected(附源码)
.NetWebDeveloper的WebService,接收C#客户端发送的文件,服务器使用了物理绝对路径(Physicalpath),跟踪调试,WebService的asmx执行存放文件操作时会弹出"Physicalpathgiven,virtualpathexpected"(需要相对路径)异常。WebService握手和收发文件测试图借助Google搜索引擎,找到同类问题:Server.Map
Grayson.Yang
·
2020-08-12 10:31
Web
Service
Web
Service
C#
path
调试
异常
ASP.NET中读取Excel内容,并显示在界面上
b){return;}stringname=fuExcel.FileName;stringfilepath=Server.
MapPath
("~/upload/
bashigufen
·
2020-08-11 17:36
ADO.NET 读取EXCEL的实现代码(C#)
//连接字符串复制代码代码如下://连接字符串stringxlsPath=Server.
MapPath
("~/app_data/somefile.xls");//绝对物理路径stringconnStr=
weixin_30241919
·
2020-08-11 15:33
移除XML文档里所有的命名空间
stackoverflow.com/questions/987135/how-to-remove-all-namespaces-from-xml-with-c{XElementxe=XElement.Load(Server.
MapPath
weixin_30726161
·
2020-08-10 23:33
浏览器以二进制流方式读取文件
privatevoidPage_Load(objectsender,System.EventArgse){Response.ContentType="Application/msword";stringFilePath=
MapPath
yinyaling
·
2020-08-10 05:49
C#
绝对路径与相对路径的相互转换
//本地路径转换成URL相对路径privatestringurlconvertor(stringimagesurl1){stringtmpRootDir=Server.
MapPath
(System.Web.HttpContext.Current.Request.ApplicationPath.ToString
willianyy
·
2020-08-10 04:35
.net技术
C#绝对路径和相对路径的相互转换
绝对路径转相对路径/////////privatestaticstringurlConvertor(stringstrUrl){stringtmpRootDir=HttpContext.Current.Server.
MapPath
lideyuans
·
2020-08-09 18:27
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他