各位高手,请教C#如何获取文件名(不带扩展名的),比如,Q.jpg文件,我只想要Q
解决方案 »
- 关于数据库还原的一个小问题。。。
- 请问HTML标准属性
- 要在一个B/S系统中提供这样Excel文件纪录导入的功能,用什么技术比较好?
- 服务器端如何得到动态htm控件的值,请大家来帮帮忙。
- 往access数据库中添加内容
- 如何拆分"怎么回事|||怎么回事啊|||怎么回事啊啊"
- 数据库里表fill到ds里,mytable=ds.table(0),再通过按钮事件更改mytable.select时,还会再连接一次数据库吗?
- ComponentDesigner为什么不能引用
- 求哥哥们帮忙看看下面的意思!多谢了!
- 救命啊,我的ASP应用程序无法调试,web控件在网页上看不到了
- 这个MVC的路由是怎么回事?我怎么敲也是语法错误。高手指点一下。
- 求助 怎么获取动态类的属性
System.IO.Path.GetFileNameWithoutExtension(filePath) //返回不带扩展名的文件名
System.IO.Path.GetDirectoryName(filePath) //返回文件所在目录
string fullFileName = System.IO.Path.GetFileName(filePath);
string fileName = fullFileName.LastIndexOf(".");
string fullFileName = System.IO.Path.GetFileName(filePath);
int position = fullFileName.LastIndexOf(".");
string fileName = fullFileName.Substring(0,position-1)
string[] arraryFile;
arraryFile = fullname.Split('.');
string filename = arraryFile[0];Response.Write(filename);
string fullname = "Q.jpg";
string filename = fullname.Substring(0,fullname.LastIndexOf("."));Response.Write(filename);
string[] arraryFile;
arraryFile = fullname.Split('.');
string filename = arraryFile[0];Response.Write(filename);
string str="xxxxxxx.jpg"
string[] aa;
aa= str.Split('.');
string 文件名 = arraryFile[0];//你要的文件名