i am using asp.net 3.0 and i m getting the following error when using the C# code.
Description:
An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0120: An object reference is required for the non-static field, method, or property 'System.Web.HttpResponse.OutputStream.get'
Source Error:
Line 24: watermarktest ob = new watermarktest(); Line 25: Line 26: ob.AddWatermark(filename, "Watermark Test", HttpResponse.OutputStream); Line 27: Line 28:
I've been trying to use AddWatermark and have the same error.
I understand what the AddWatermark method is doing with the bitmap / graphics code but don't understand how the 'Stream outputStream' parameter is used by the calling C# method.
I am using an ASP.NET Image control to display an image after selecting a file from a number of files in a folder and using C# to set the ImageURL property and resizing the Width and Height properties.
I want to put a watermark on the image (display only) so the AddWatermark method seems to be suitable.
I know that System.Web.UI.WebControls.Image is the ASP.NET server-side control class used to render the image and this is different from the output from AddWatermark.
How do I use the output from AddWatermark(filename, "Watermark Test", HttpResponse.OutputStream) to convert into System.Web.UI.WebControls.Image data ?
anooptheprof...
Member
8 Points
4 Posts
Re: Adding on the fly watermark to images
Jan 19, 2010 08:24 AM|LINK
i am using asp.net 3.0 and i m getting the following error when using the C# code.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0120: An object reference is required for the non-static field, method, or property 'System.Web.HttpResponse.OutputStream.get'
Source Error:
please help me
thanks and regards
anoop
anooptheprof...
Member
8 Points
4 Posts
Re: Adding on the fly watermark to images
Jan 21, 2010 05:30 AM|LINK
I figured it out dudes
tachyon42
Member
2 Points
4 Posts
Re: Adding on the fly watermark to images
Jan 06, 2011 03:21 AM|LINK
Hi,
I've been trying to use AddWatermark and have the same error.
I understand what the AddWatermark method is doing with the bitmap / graphics code but don't understand how the 'Stream outputStream' parameter is used by the calling C# method.
I am using an ASP.NET Image control to display an image after selecting a file from a number of files in a folder and using C# to set the ImageURL property and resizing the Width and Height properties.
I want to put a watermark on the image (display only) so the AddWatermark method seems to be suitable.
I know that System.Web.UI.WebControls.Image is the ASP.NET server-side control class used to render the image and this is different from the output from AddWatermark.
How do I use the output from AddWatermark(filename, "Watermark Test", HttpResponse.OutputStream) to convert into System.Web.UI.WebControls.Image data ?
Thanks
pateltanmay2...
Member
23 Points
40 Posts
Re: Adding on the fly watermark to images
Jun 23, 2012 05:14 PM|LINK
Thanks for your coding.
It is definetly helpfull to me.
Thanks Ramesh Bandi...