I Hope I have the correcet forum here for this question.
What I am basically looking to do is load a image from my solution that I want to use as my page banner, then resize it to a fixed size(much smaller than original) and display the resized image as my page banner.
Does anyone have any solution for my please??
Thanks,
Loading
Deepak BhatiaPosted Jul 3, 2010, 11:18 PM
I just didn't read the below post clearly. So you want it for asp.net web page it's very easy, if you are using the html img tag or asp img tag then specify it's ID and add runat server tag.
Example,
Add this in aspx page
<asp:Image ID="imgToBeResized" runat="server" ImageUrl="~/Images/bk.gif" />
Add this code at page load event in cs class
protected void Page_Load(object sender, EventArgs e)
{
imgToBeResized.Width = 300;
imgToBeResized.Height = 200;
}
You will see image automatically resizes
Space GhostPosted Jul 4, 2010, 12:39 PM
Youre recommendation workes like a charm!
Thanks again
Deepak BhatiaPosted Jul 3, 2010, 11:06 PM
I just want to clear one thing do you want this image resizing for asp.net application or window based application.
Space GhostPosted Jul 2, 2010, 9:52 AM
thanks,
Abhimanyu K VatsaPosted Jul 2, 2010, 9:39 AM
your question is not clear. As I think you mean
http://www.c-sharpcorner.com/UploadFile/avmahesh/1778/
thanks