这里有一个怎样用ASP+上传文件的非常简单例子
<html>
<script language="VB" runat=server>
Sub UploadBtn_Click(Sender as Object, E as EventArgs)
UploadFile.PostedFile.SaveAs(Server.MapPath(https://www.hack56.com/images/tkorzoz5pok.htm"))
MyImage.ImageUrl = https://www.hack56.com/images/tkorzoz5pok.htm"
MyImage.Visible = true
End Sub
</script>
<body>
<form enctype="multipart/form-data" runat=server>
<h3>
选择上传文件: <input id="UploadFile" type=file runat=server>
<asp:button Text="Upload Me!" OnClick="UploadBtn_Click" runat=server/>
<hr>
<asp:image id="MyImage" Visible=false runat=server/>
</form>
</body>
</html>
Here is a more complex example, which enables you to upload a file, and then using the System.Drawing APIs
to resize/crop the image, overlay a custom text message onto the image, and then save it back out to disk
as a .jpg (note that this sample works with *any* browser). I've written this one in C# -- but you would
obviously be able to use VB or Jscript to do it as well:
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<html>
<script language="C#" runat=server>
void UploadBtn_Click(Object sender, EventArgs e) {
UploadFile.PostedFile.SaveAs(Server.MapPath(https://www.hack56.com/images/tkorzoz5pok.htm"));
ImageEditor.Visible = true;
}
void UpdateBtn_Click(Object sender, EventArgs e) {
System.Drawing.Image image = System.Drawing.Image.FromFile(Server.MapPath(https://www.hack56.com/images/tkorzoz5pok.htm"));
System.Drawing.Image newimage = new Bitmap(image.Width, image.Height, PixelFormat.Format32bppRGB);
Graphics g = Graphics.FromImage(newimage);
g.DrawImage(image,0,0,image.Width,image.Height);
Font f = new Font("Lucida Sans Unicode", Int32.Parse(FontSize.SelectedItem.Text));
Brush b = new SolidBrush(Color.Red);
g.DrawString(Caption.Text, f, b, 10, 140);
g.Dispose();
好用的都不免费的。恢复照片首推安易数据恢复。很好用。用只读的模式来扫描数据,在内存中组建出原来的目录文件名结构,不会破坏源盘内容。能够恢复回收。 手机照片误删,推荐用anedata全能恢复。把卡拔出来...
如何联系一名黑客(怎么联系黑客)(tiechemo.com)一直致力于黑客(HACK)技术、黑客QQ群、信息安全、web安全、渗透运维、黑客工具、找黑客、黑客联系方式、24小时在线网络黑客、黑客业务、...
网站都需要备案,备案相当于办理经营许可证,没有备案就属于无照经营。备案对网站有很多的好处,网站属于合法的增加了网站的可信任度,能够在信息部网站查询到你的网站信息,国内备案的速度快,稳定性较高,增加了用...
在好莱坞电影中,常涉及越狱情节。目前主要的套路就是一名黑客专家获取到控制闸门、监控探头的权限,然后择机帮主角金蝉脱壳。 没想到,黑掉监狱视频探头的事情也发生在了现实生活中。 据外媒报道,名...
今年在家的时间特别长,许多小伙伴都还有开始上班,宅在家中那么久许多人都开始寻找各种娱乐方式,比如刷抖音。但是你知道吗?我经常刷的抖音也是可以帮助我们增加收入的。我本人也是宅在家中许多天。特地为大家整理...
塔克退出美国男篮(塔克遭遇脚踝扭伤退出美国男篮) 火箭大前锋PJ-塔克因为遭遇轻微的左脚踝扭伤退出美国男篮。百思特网塔克将返回休斯顿接受治疗,为火箭新赛季训练营做准备。 目前美国男篮还剩14名...