|Dart Home | PowerWEB Zoom for ASP.NET | Custom Development||Reply | PowerWEB Zoom for ASP.NET Topics | Forums|
|Author||Forum: PowerWEB Zoom for ASP.NET|
Topic: Parameter is Not Valid Error When LoadImage called
From: Tulsa, OK USA
Member Since: 05/20/08
|posted June 13, 2008 11:10 AM
I'm evaluating PowerWeb Zoom before I buy it to see if it will work for use. All images will need to be loaded dynamically based on query results. When the use clicks on the thumbnail I'm opening another page that will have the PowerWeb Zoom control and the larger image. I get a parameter not valid error when I call the LoadImage function. Here is a part of the code that gets the imagestream and tries to load it:
sImagePath = sImagePath.Trim();
string sFileName = "12456.jpg";
// create an image object, using the filename we just retrieved
System.Drawing.Image image = System.Drawing.Image.FromFile(sImagePath);
// make a memory stream to work with the image bytes
MemoryStream imageStream = new MemoryStream();
imageStream.Position = 0;
// Load the image into the Zoom control
// ...and set this image as the active image
Zoom1.SourceImage = sFileName;
|K M Drake
From: Utica, NY USA
Member Since: 07/14/00
|posted June 13, 2008 11:52 AM
I just tried your code and it worked for me.
Are you sure the second parameter is "12456.jpg"?
You will see an error if the filename lacks an extension.
Are you sure sImagePath is correct?
|Reply | PowerWEB Zoom for ASP.NET Topics | Forums|
|This site is powered by PowerTCP WebServer for ActiveX|