Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
sakamali
Posted - 14 Oct 2014 : 10:44:33 Hi, In your sample solution, there is a stream like this:
BufferedImage chartimage = new BufferedImage(chartVu, ImageFormat.Jpeg);
How can I save this image to my local disc in Asp.Net? Thanks in advance.
3 L A T E S T R E P L I E S (Newest First)
sakamali
Posted - 15 Oct 2014 : 09:34:14 Hi, Thanks for your answer. It is useful for us. Best Regards.
quinncurtis
Posted - 15 Oct 2014 : 08:50:55 Asp.Net and Windows place restrictions on where a web app can actually place files, to keep malicious web apps from trashing a computer. That is a general Asp.net topic of discussion and you can Google the topic to read more about it. Here is one article: http://forums.asp.net/t/1220571.aspx?Save+image+from+ASP+Image+to+file+on+server . You can use code similar to below to get a local app folder you can save the file to.
String rootfolder = Server.MapPath("~"); // returns the root folder the executing asp.net app String filepath = rootfolder + "spcchart.jpg"; chartimage.SaveImage(filepath);
sakamali
Posted - 15 Oct 2014 : 01:55:33 With this code block, I take an error like this: