473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

image save in server

hai,
i am saving the image in server by using response.saveas("path name") in .net. The image is saving but preview is not available. please can you give any suggestion.

With Regards,
K.Jayasabari
Sep 13 '07 #1
3 1054
hai,
I am saving the images to the server by using response.saveas("path name"). The images is saving the located path but the preview is not there. I am using in .net. please can you give any suggestion.

With regards,
k.Jayasabari.
Sep 13 '07 #2
Shashi Sadasivan
1,435 Expert 1GB
hai,
I am saving the images to the server by using response.saveas("path name"). The images is saving the located path but the preview is not there. I am using in .net. please can you give any suggestion.

With regards,
k.Jayasabari.
Open the file into a memory stream and use a bufferreader to convert it to byte[],
and store the byte[] into the BLOB field of your DB.

Expand|Select|Wrap|Line Numbers
  1. BinaryFormatter bf = new BinaryFormatter();
  2.             MemoryStream ms = new MemoryStream();
  3.             bf.Serialize(ms, theImageFileObject);
  4.             byte[] byteArray = ms.ToArray();
  5.  
cheers
Sep 13 '07 #3
Open the file into a memory stream and use a bufferreader to convert it to byte[],
and store the byte[] into the BLOB field of your DB.

Expand|Select|Wrap|Line Numbers
  1. BinaryFormatter bf = new BinaryFormatter();
  2.             MemoryStream ms = new MemoryStream();
  3.             bf.Serialize(ms, theImageFileObject);
  4.             byte[] byteArray = ms.ToArray();
  5.  
cheers

Can you send ne the detail example codding please..
Sep 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: moondaddy | last post by:
Using vb.net I need to download image files to the client browser where they can save to disk. Below is some sample code I'm using. when I run this the File Download window in the browser says: ...
5
by: aarondouglas28 | last post by:
Hey all, I'm hoping someone can help me with a little problem I have. First a little background. I'm working on developing a site which displays live feeds from a security camera. The camera is...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
0
by: pedro007 | last post by:
I have 2 listviews and want to save the two lists into an excel file, not individually but save the 2 lists in 2 tables in a file. is that possible, what should I do? Thanks for your help. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.