-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Dakshineswar
Message 5 in Discussion

 
Place a file field in the web form which is a HTML Control in the webform 
IN the form tag of the web form you have to specify the following attribute 
enctype="multipart/form-data" 
Suppose the control name of file field is txtFieldFile 
// Get a reference to PostedFile object 
HttpPostedFile myFile = txtFieldFile.PostedFile; 
// Get size of uploaded file 
int nFileLen = myFile.ContentLength; 
// Allocate a buffer for reading of the file 
byte[] myData = new byte[nFileLen]; 
// Read uploaded file from the Stream 
myFile.InputStream.Read(myData, 0, nFileLen);  
 
// Create a file 
FileStream newFile = new FileStream(newfilename, FileMode.Create); 
// Write data to the file 
newFile.Write(Buffer, 0, Buffer.Length); 
// Close file 
newFile.Close(); 
} 
I hope this should help you in how to create an OpendialogBox and upload a file 
  
Kalyan D. bheri 
[EMAIL PROTECTED]

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to