I display an image from a database with an image handler. Works fine but I need the image width & height?
code:
<asp:Image ID="Image2" runat="server" ImageUrl="~/ImageHandler/ImageHandler.ashx?ID=1&imgNme=HomePage"
handler:
public void ProcessRequest (HttpContext context) {
string ImageName = context.Request.QueryString["imgNme"];
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConString"].ConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "SELECT " + ImageName + " from Images where
ID=@ID";
cmd.CommandType = System.Data.CommandType.Text;
& ...
Go to the complete details ...