flex上传文件(flex+asp.net)
废话不说,直接代码部分代码摘抄自网上,在此想原作者表示感谢
1、服务端 uploadFile.ashx
<%@ WebHandler Language="VB" Class="UploadFile" %>
Imports System
Imports System.Web
Imports System.Web.HttpServerUtility
Imports System.IO
Imports System.Web.HttpRequest
Public Class UploadFile : Implements IHttpHandler
Private m_UploadPath As String = "~\Files\"
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain"
Dim responses As String = ""
Dim files As HttpFileCollection = context.Request.Files
If files.Count = 0 Then
'Response.Write("请勿直接访问本文件")
context.Response.End()
Else
' 只取第 1 个文件
Dim file As HttpPostedFile = files.Item(0)
If (file IsNot Nothing AndAlso file.ContentLength > 0) Then
Dim path_1 As String = context.Server.MapPath(m_UploadPath)
Dim today As DateTime = DateTime.Today
Dim dirname As String = String.Format("/Files/{0}/{1}/{2}/", today.Year, today.Month, today.Day)
&n
相关文档:
在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......
ASP.NET中实现页面间的参数传递 (转载)
&n ......
Global.asax 文件,有时候叫做 ASP.NET 应用程序文件,提供了一种在一个中心位置响应应用程序级或模块级事件的方法。你可以使用这个文件实现应用程序安全性以及其它一些任务。下面让我们详细看一下如何在应用程序开发工作中使用这个文件。
概述
Global.asax 位于应用程序根目录下。 ......
在项目中用到了多个module时,在第一次加载Module是可以的。在第二次加载module时会出现转换失败
解决方法:
如下为解决办法:在要调用远程对象的Application文件里面,加上如下声明语句:
import flash.net.registerClassAlias;
registerClassAlias("JAVA端的类全名",A ......
1:GridView 添加属性(是否删除,鼠标经过背景)
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
& ......