You can convert the bytes to base64 and then save in session and it will display mage without saving.
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
if (Request.InputStream.Length > 0)
{
using (StreamReader reader = new StreamReader(Request.InputStream))
{
string hexString = Server.UrlEncode(reader.ReadToEnd());
string imageName = DateTime.Now.ToString("dd-MM-yy hh-mm-ss");
string imagePath = string.Format("~/Captures/{0}.png", imageName);
byte[] bytes = ConvertHexToBytes(hexString);
string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
Session["CapturedImage"] = "data:image/png;base64," + base64String;
}
}
}
}