易截截图软件、单文件、免安装、纯绿色、仅160KB

VB转换成C#时出现的问题 - .NET技术 / C#

一个简单的文件管理器,显示upload文件夹下的文件,原来是VB的,能用,改写成C#之后不知道哪的问题可执行但文件内容不显示,请各位帮忙看一下问题在哪,谢谢!

================
<%@ Import Namespace="System.IO"%>
<%@ Import Namespace="System.Data"%>
<script language="C#" runat="server">
void PageLoad()
{
 if(!IsPostBack)
 {
  BindData();
 }
}
void MyDG_Delete(Object sender,DataGridCommandEventArgs E)
{
 String myfile;
 myfile=Server.MapPath(@"upload\"+MyDG.DataKeys[E.Item.ItemIndex]);
 File.Delete(myfile);
 MyDG.EditItemIndex=-1;
 BindData();
}
void BindData()
{
 DirectoryInfo mydir=new DirectoryInfo(Server.MapPath("upload"));
 MyDG.DataSource=mydir.GetFiles("*.*");
 MyDG.DataBind();
}
</script>

<html>
<body>
<h4 align="center">我的文件管理器</h4>
<a href="upload.aspx">上传文件</a>
<form runat="server">
<ASP:DataGrid id="MyDG" HeaderStyle-BackColor="#BCBCBC" Width="100%" AutoGenerateColumns="false" OnDeleteCommand="MyDG_Delete" DataKeyField="Name" runat="server">
<Columns>
<asp:HyperLin


相关问答:

linux环境下gethostbyname函数问题 - C/C++ / C语言

写了个测试程序如下
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

C# DataSet导出xml 批处理(循环)得怎么处理

DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
      <B>
        <C>
        </C>
  &nb ......

sql小小的疑问 - .NET技术 / C#

可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......

vb超简单form.show的问题 - VB / 非技术类

为什么我用form.show和form.hide多次连接了两个窗口只能互换链接两次啊?
代码看看
照道理form.show 没次数限定的吧

我也快疯了。
楼主知道怎么发贴么?

引用
我也快疯了。
楼主知道怎么发贴么?
楼主也 ......

vb - VB / 基础类

我想把word另存为xml之后,用vb读取这个xml的内容,请问如何实现?
dim f as integer
dim b() as byte
dim s as string
dim L as long
f=freefile()
open "abc.xml" for binary access read as #f
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号