Click to See Complete Forum and Search --> : permission rights for read write


xxsoulxx
February 11th, 2006, 09:14 PM
hi there, i have a sample.jpg that whenever i change the file to another pc, i have problems writing to the file, and have to change the security setting of the files again ....


Dim s As Stream = File1.PostedFile.InputStream
Dim data(File1.PostedFile.ContentLength - 1) As Byte
If (data.Length > 0) Then 'if there's update of image
If (data.Length > 524288) Then
'pop-up if image exceed the size limit
Me.RegisterStartupScript("Error", "<script language = 'javascript'> alert('Image Size Too Big!');</script>")
Else
bl.setGreetingName(GreetingN, rId)
bl.AddSetting(StoreSetting, rId) 'update setting
s.Read(data, 0, File1.PostedFile.ContentLength)
bl.UploadImage(data, rId) 'update image
If Page.IsValid Then
Response.Redirect("CfmSetting.aspx?rId=" + rId) 'Direct to Updated Page
End If
End If
End If