|
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class AddImage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
//Browse the image file and then convert it to byte[] data
byte[] tempBuff = new byte[Upload1.PostedFile.InputStream.Length];
Upload1.PostedFile.InputStream.Read(tempBuff, 0, Convert.ToInt32(Upload1.PostedFile.InputStream.Length));
Upload1.PostedFile.InputStream.Close();
//Call ImageDataService Web Service
newsImageDataService.ImageDataService fireImage = new newsImageDataService.ImageDataService();
fireImage.FireImage("user_name", "password", tempBuff);
Response.Write("Article Successfully saved!!");
}
catch (Exception ex)
{
Response.Write("Error: " + ex.Message);
}
finally
{
//do nothing
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.