Hey Omar,
If i got your problem right, here is the solution.
Provided you have'nt kept any security check at the web-service.
Quote:
how to Build a method to get back the url of the image or the image it self
You can get back the image URL by returning it from Upload file method, instead of status.
And check its status through string functions or regular expressions.
[WebMethod]
public string UploadFile(byte[] f, string fileName)
{
try
{
MemoryStream ms = new MemoryStream(f);
string imgURL=System.Web.Hosting.HostingEnvironment.MapPath
("~/TransientStorage/") + fileName;
FileStream fs = new FileStream(imgURL, FileMode.Create);
ms.WriteTo(fs);
ms.Close();
fs.Close();
fs.Dispose();
return imgURL;
}
catch (Exception ex)
{
return ex.Message.ToString();
}
Quote:
how to Get the image or the image url and set to asp.net image control or other suitable control
Once you get the img URL, you can set it to image control or simply an HTML image tag,
<img src="imgURL" />