so i want if images are tooo small then they should be display in original size
or if the images are tooo large then i want to fix the maximum size to adjust their height and width .. how to do?
Thank you!
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit ChoudharyPosted Mar 20, 2010, 4:23 AM
here is your error:
Error: ImageUrl='<%# "~/Mygang/Controls/ThumbJpeg.ashx?Vfilepath=~/Mygang/albumImages/" + (Eval("Image","albumImages/{0}")+"&Height=100&Widthe=100") %>'
Corrected: ImageUrl='<%# "~/Mygang/Controls/ThumbJpeg.ashx?VFilePath=~/Mygang/albumImages/" + (Eval("Image")+"&Height=100&Width=100") %>'
no need to give path "albumImages/{0}" in Eval(); just fetch the image name ... and check the spells too.. cause these are parameters are used by Handler file..Case Sensitive
hope you got problem solved.
Dipa AhujaPosted Mar 18, 2010, 12:28 PM
my images are in "albumImages" folder i wrote this way..
ImageUrl='<%# "~/Mygang/Controls/ThumbJpeg.ashx?Vfilepath=~/Mygang/albumImages/" + (Eval("Image","albumImages/{0}")+"&Height=100&Widthe=100") %>'
bt images are not shown..
Amit ChoudharyPosted Mar 18, 2010, 1:20 AM
you can use an handler for this. i have created the handler in my website to deal with different size of images.
here is the example code how to use it in your aspx code or in code behind c#
aspx:
Codebehind:
Please mark as answer if it helps.