小编ent*_*thu的帖子

从fileupload保存图像

我正在使用fileupload控件在表单上有图像,并且该图像必须保存在硬盘中的某个文件夹上"E:\\asp_net".

是否有任何可能的方法从fileupload保存磁盘上的图像,如果有任何其他图像具有相同的名称,它应该被覆盖?

c# asp.net

1
推荐指数
1
解决办法
9932
查看次数

C#:配置文件错误

我创建了一个.config文件,其中没有给出任何<configuration>标记.它在我的项目中工作正常.但是现在当我为项目创建单元测试用例时,它给出了一个project.dll没有<configuration>标记的异常.如果我在.config文件中包含标记,则项目会出错.我正在使用vs-2008.我创建的.config文件为:

<?xml version="1.0" encoding="utf-8" ?>
  <appSettings>
....
.....
</appSettings>
Run Code Online (Sandbox Code Playgroud)

如果我<configuration>.config文件中使用标记错误来自项目,测试用例工作正常.错误来自:

根元素必须与引用文件的部分名称'appSettings'匹配

当我删除<configuration>标记时,错误在单元测试用例中出现:

unit test runner failed to  load test assembly.
jetbrains.resharper.taskrunnerframework.taskexception.configuration system fail to initialize.
jetbrains.resharper.taskrunnerframework.taskexception.configuration file project.dll doesnot have <configuration> tag.
Run Code Online (Sandbox Code Playgroud)

c# config

0
推荐指数
1
解决办法
2471
查看次数

标签 统计

c# ×2

asp.net ×1

config ×1