hello,
i want use this watermark:
http://www.aspsnippets.com/Articles/Create-Add-Watermark-Text-to-Images-Photo-in-ASPNet-using-C-and-VBNet.aspx
but i want used in formview, please how i changed code in C# ?

and this is my FormView:
Asp.net
<asp:FormView ID="FormView1" runat="server" DataKeyNames="id"
DataSourceID="SqlDataSource1" DefaultMode="Insert" Width="1200px">
<InsertItemTemplate>
<table class="style1">
<tr>
<td valign="top" class="style5">ناونیشان:</td>
<td>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("title") %>'
Width="400px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="TextBox1" ErrorMessage="تکایە ناونیشان داخڵ بکە !"
ValidationGroup="VG1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td valign="top" class="style5">درێژە:</td>
<td>
<telerik:RadEditor ID="RadEditor1" runat="server" Style="width: 100%; font-family: 'Droid Arabic Kufi'; font-size: 10px; direction: rtl; text-align: right"
Content='<%# Bind("Detail") %>' Skin="Sunset" ImageManager-EnableImageEditor="true" ImageManager-DeletePaths="~/Files/Images" ImageManager-UploadPaths="~/Files/Images" ImageManager-ViewPaths="~/Files/Images" AllowScripts="true">
<Content>
</Content>
<ImageManager DeletePaths="~/Files/Images"
ImageEditorHttpHandlerUrl="~/Files/Images"
UploadPaths="~/Files/Images" ViewPaths="~/Files/Images"
MaxUploadFileSize="4000000" />
<CssFiles>
<telerik:EditorCssFile Value="~/AdpanelYoga/EditorContentArea.css" />
</CssFiles>
<DocumentManager DeletePaths="~/Files/Documents" MaxUploadFileSize="4000000"
UploadPaths="~/Files/Documents" ViewPaths="~/Files/Documents" />
<FlashManager DeletePaths="~/Files/Flash" MaxUploadFileSize="4000000"
UploadPaths="~/Files/Flash" ViewPaths="~/Files/Flash" />
<MediaManager DeletePaths="~/Files/Media" MaxUploadFileSize="4000000"
UploadPaths="~/Files/Media" ViewPaths="~/Files/Media" />
</telerik:RadEditor>
</td>
</tr>
<tr>
<td valign="top" class="style5">وێنە:</td>
<td>
<asp:FileUpload ID="FileUpload1" runat="server" style="margin-right: 0px" />
</td>
</tr>
<tr>
<td valign="top" class="style5"> </td>
<td>
<telerik:RadButton ID="Button1" runat="server" Text="ناردن" CommandName="Insert" ValidationGroup="VG1" Skin="Office2007">
<Icon PrimaryIconCssClass="rbSave" PrimaryIconLeft="4" PrimaryIconTop="4" />
</telerik:RadButton>
<telerik:RadButton ID="RadButton7" runat="server" Text="پەشیمان بوونەوە" CausesValidation="False" CommandName="Cancel" Skin="Office2007">
<Icon PrimaryIconCssClass="rbCancel" PrimaryIconLeft="4" PrimaryIconTop="4" />
</telerik:RadButton>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" ValidationGroup="VG1" />
</td>
</tr>
</table>
</InsertItemTemplate>
</asp:FormView>
C#
protected void Upload(object sender, EventArgs e)
{
string watermarkText = "© test.com";
//Get the file name.
string fileName = Path.GetFileNameWithoutExtension(FileUpload1.PostedFile.FileName) + ".png";
//Read the File into a Bitmap.
using (Bitmap bmp = new Bitmap(FileUpload1.PostedFile.InputStream, false))
{
using (Graphics grp = Graphics.FromImage(bmp))
{
//Set the Color of the Watermark text.
Brush brush = new SolidBrush(Color.Red);
//Set the Font and its size.
Font font = new System.Drawing.Font("Arial", 30, FontStyle.Bold, GraphicsUnit.Pixel);
//Determine the size of the Watermark text.
SizeF textSize = new SizeF();
textSize = grp.MeasureString(watermarkText, font);
//Position the text and draw it on the image.
Point position = new Point((bmp.Width - ((int)textSize.Width + 10)), (bmp.Height - ((int)textSize.Height + 10)));
grp.DrawString(watermarkText, font, brush, position);
using (MemoryStream memoryStream = new MemoryStream())
{
//Save the Watermarked image to the MemoryStream.
bmp.Save(memoryStream, ImageFormat.Png);
memoryStream.Position = 0;
//Start file download.
Response.Clear();
Response.ContentType = "image/png";
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
//Write the MemoryStream to the Response.
memoryStream.WriteTo(Response.OutputStream);
Response.Flush();
Response.Close();
Response.End();
}
}
}
}