怎样在UpdatePanel里使用FileUpload控件
1个回答
展开全部
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.cmdButton1.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(Me.cmdButton2, ""))
End Sub
Protected Sub cmdButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If Me.FileUpload1.HasFile Then
System.Threading.Thread.Sleep(1000)
Me.Label1.Text = Me.FileUpload1.FileName
End If
End Sub
Me.cmdButton1.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(Me.cmdButton2, ""))
End Sub
Protected Sub cmdButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If Me.FileUpload1.HasFile Then
System.Threading.Thread.Sleep(1000)
Me.Label1.Text = Me.FileUpload1.FileName
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询