I am using Visual Studio 2005 and I am little new for the Mobile web Development. I am developing a website exclusively for mobiles using Mobile Web Forms. I have a requirement that, I need to resize the image based on the mobile display and fit it to the
screen.
"<mobile:Image " tag cannot resolve this problem.
Please guide me to get it resolved with an appropriate alternate.
Thanks & Regards
Gopal B
Gopal B
gopalbabu.8689@hotmail.com
Please 'Mark as Answer' if this post helps you
Mobile Web Forms are depreciated now! Now a days general ASP.NET web site works absolutely fine in Mobile browsers, since all most all the mobile browsers are capable of rendering HTML 5!
Member
101 Points
73 Posts
Resize image in Mobile Webform
Feb 12, 2013 06:01 AM|gopalbabu.8689|LINK
Hi,
I am using Visual Studio 2005 and I am little new for the Mobile web Development. I am developing a website exclusively for mobiles using Mobile Web Forms. I have a requirement that, I need to resize the image based on the mobile display and fit it to the screen.
"<mobile:Image " tag cannot resolve this problem.
Please guide me to get it resolved with an appropriate alternate.
Thanks & Regards
Gopal B
gopalbabu.8689@hotmail.com
Please 'Mark as Answer' if this post helps you
Star
11795 Points
2340 Posts
Re: Resize image in Mobile Webform
Feb 12, 2013 06:09 AM|urenjoy|LINK
If you want to display same image with different size, set max-width:100% for the image
http://stackoverflow.com/questions/11077687/how-do-we-fix-the-image-sizes-for-mobile-sites
OR you can use css3 media queries.
http://www.webdeveloper.com/forum/showthread.php?244434-Image-Resizing-Media-Queries
Member
101 Points
73 Posts
Re: Resize image in Mobile Webform
Feb 12, 2013 06:30 AM|gopalbabu.8689|LINK
Hi urenjoy,
Thanks for you reply. But I think you have mistaken. I need to define the image size in mobile form. Find my following sample source.
In this "<mobile:Image ID="Image1" Runat="Server"></mobile:image>" tag, i need to mention the image size.
Regards
Gopal B
gopalbabu.8689@hotmail.com
Please 'Mark as Answer' if this post helps you
Star
12372 Points
3302 Posts
Re: Resize image in Mobile Webform
Feb 12, 2013 06:43 AM|geniusvishal|LINK
For Different Mobile Device Use Different Images with different dimensions:
http://www.w3schools.com/dotnetmobile/mobile_images.asp
Also Try to simulate the page using:
http://www.asp.net/mobile/device-simulators
My Website
www.dotnetvishal.com
Star
14065 Points
3270 Posts
Re: Resize image in Mobile Webform
Feb 12, 2013 11:34 AM|roopeshreddy|LINK
Hi,
Mobile Web Forms are depreciated now! Now a days general ASP.NET web site works absolutely fine in Mobile browsers, since all most all the mobile browsers are capable of rendering HTML 5!
Moreover, try adding Viewport meta tag!
I blogged the same - http://roopeshreddy.wordpress.com/2012/12/29/mobile-web-applications-with-asp-net-webforms/
Hope it helps u...
Roopesh Reddy C
Roopesh's Space