T
Tony WONG
i tried to show hidden label and hidden button after successful upload. it
fails
but i tried to put to UNsuccessful upload, it works.
Could i have your advice? Thanks a lot.
************************************
Sub FormView1_ItemUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewUpdateEventArgs) Handles
FormView1.ItemUpdating
If postedFile.HasFile Then
If postedFile.PostedFile.ContentLength <= 2097152 Then
postedFile.SaveAs("e:\" + Request.QueryString("year") + "\"
+ myFileName.Text)
FormView1.FindControl("LabelOversize3").Visible = True
FormView1.FindControl("UploadButton").Visible = False
Else
e.Cancel = True
FormView1.FindControl("LabelOversize2").Visible = True
End If
End If
End Sub
fails
but i tried to put to UNsuccessful upload, it works.
Could i have your advice? Thanks a lot.
************************************
Sub FormView1_ItemUpdating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewUpdateEventArgs) Handles
FormView1.ItemUpdating
If postedFile.HasFile Then
If postedFile.PostedFile.ContentLength <= 2097152 Then
postedFile.SaveAs("e:\" + Request.QueryString("year") + "\"
+ myFileName.Text)
FormView1.FindControl("LabelOversize3").Visible = True
FormView1.FindControl("UploadButton").Visible = False
Else
e.Cancel = True
FormView1.FindControl("LabelOversize2").Visible = True
End If
End If
End Sub