Cerebrus wrote:
For instance, is this code wrong ? :-
---------------------------------------------------
Dim MyFile As HttpPostedFile
Dim MyStream As System.IO.Stream
MyFileCollection = Request.Files
MyFile = MyFileCollection(0)
' Initialize the stream.
MyStream = MyFile.InputStream
---------------------------------------------------
Regards,
Cerebrus.
As well, when I do the following:
Private Sub Add30_Preview(ByVal sender As Object, ByVal e As EventArgs)
If Nothing <> ImageUpLoad.PostedFile Then
Dim imgStream As Stream = ImageUpLoad.PostedFile.InputStream
Dim imgLen As Integer = ImageUpLoad.PostedFile.ContentLength
Dim imgType as String =
ImageUpLoad.PostedFile.ContentType.ToString().ToLo wer()
End If
I get the following error message:
Compiler Error Message: BC30451: Name 'ImageUpLoad' is not declared.
Source Error:
Line 203: End Sub
Line 204: Private Sub Add30_Preview(ByVal sender As Object, ByVal e As
EventArgs)
Line 205: If Nothing <> ImageUpLoad.PostedFile Then
Line 206: Dim imgStream As Stream = ImageUpLoad.PostedFile.InputStream
Line 207: Dim imgLen As Integer = ImageUpLoad.PostedFile.ContentLength
The problem is, ImageUpLoad is properly declared in the code!! It is
properly declared as an HtmlInputFile in the Page_Load in the following
manner:
Dim imgupload As New HtmlInputFile
myForm.Controls.Add(imgupload)
imgupload.ID = "ImageUpLoad"
imgupload.Accept = "image/jpg"
Please Help!
TIA.
...Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
* “I contend that we are both atheists. I just believe in one fewer *
* god than you do. When you understand why you dismiss all the other *
* possible gods, you will understand why I dismiss yours.” *
* - Stephen F. Roberts *
************************************************** *********************
* “Anyone who believes in Intelligent Design (“creationism”) is just *
* as ignorant, irrational and ill-educated as someone who believes *
* that the world is a flat disc, that the Sun circles the Earth or *
* that there really is a tooth fairy. Darwinism has an overwhelming *
* foundation of evidence that can be tested and reproduced. *
* *
* “Intelligent Design, on the other hand, has no evidence at all;not *
* one single shred of testable proof. As such, Intelligent Design is *
* Religious Mythology, and has no right whatsoever to be in our *
* Science classrooms.” - 99.99+% of Scientists *
************************************************** *********************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.” Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************