In many cases, you need to add copyright or some additional text information to the images uploaded by the user. The following is a simple example of how to implement this function.
<% @ Page Language = "c #" Debug = "true" Trace = "true" %>
<% @ Import Namespace = "System. IO" %>
<% @ Import Namespace = "System. Drawing" %>
<% @ Import Namespace = "System. Drawing. Imaging" %>
<Html>
<Script runat = server>
Void UploadBtn_Click (Object sender, EventArgs e ){
String filename;
String filename1;
String [] filename2;
Int q;
Filename = UploadFile. PostedFile. FileName;
Filename2 = filename. Split (new Char [] {''});
Q = filename2.GetUpperBound (0 );
Filename1 = filename2 [q];
Dis. Text = "Upload File Name:" + filename1 + "<br> ";
UploadFile. PostedFile. SaveAs (Server. MapPath (filename1 ));
ImageEditor. Visible = true;
Dis. Text + = "file size:" + UploadFile. PostedFile. ContentLength + "bytes ";
Image1.Src = filename1;
}
Void UpdateBtn_Click (Object sender, EventArgs e ){
String filename1;
Filename1 = Image1.Src;
System. Drawing. Image image = System. Drawing. Image. FromFile (Server. MapPath (filename1 ));