How to capature the image in a Table in MVC3 (Razor) - asp.net-mvc-3

i have develop a MVC3 application in that i want capture the Image, that image i have set a table td baground. When i click the Button then i want capture that image .Is it possible in MVC3 ? If possible please help me .

td's are html. They are rendered by a browser, not the server.
Browsers do not have facilities to save the content they render as images. The server doesn't know anything about how it's rendered. It just sends text to the browser.
There is no way, short of an activex control of some sort (which won't work in FF, Chrome, Safari, Opera, etc..) to render the iamge people see.
You could render an image on the server side.. but it would not, necessarily, be identical to what the end users sees because each browser reders html a little differently. It would be hackish, and would require that you dig into the guts of the framework. In any event, it would be a lot of work. So, ask yourself, is months of coding really worth it for this feature?

Is there any way convert My Mvc Viepage in to Image when click on button it needs to convert entire Mymvc view page to imge and save it .

Related

phone inappbrowser doesn't start from full-zoomed-out when it loads huge image

I have a window.open code to launch inappbrowser on phonegap. I use it for displaying image.
This inappbrowser has EnableViewPortScale=yes, so it's totally zoomable.
However, it seems like there is zoom-out-limit in inappbrowser. Here is the code.
window.open(myFullImageUrl, '_blank',
'location=no,EnableViewPortScale=yes,presentationstyle=pagesheet');
It's already zoomed-in a little. I can zoom-in-and-out because of EnableViewPortScale=yes for sure.
However, it seems like there is zoom-out-limit.
when i load up 1024x768 photo, it doesn't show fully zoomed-out photo(on both iOS and Android), but it's like 120%-ish already zoomed in.
I Just created stackoverflow account, so i can't upload photo. sorry!(it says i need 10 reputations to upload image)
There is no true solution for this issue.
So what I did is I just continue using inAppBrowser, but just instead of directly loading image from Amazon server(that's where I stored all images), I just made my window.open to go to another my URL and attach that url as a parameter after '?'.
The reason why I did this is because then I can force the Image web-view to have brief Javascript and CSS to render this dang-image correctly.
And as you guys know, this page must have meta-data that allows user-scale true, and must NOT have max-scale value.
So, Yep. Long story short, If you DIRECTLY load up the image in the inAppBrowser of phonegap, there is NO WAY you can force the image to start with 'not even slightly zoomed-in, but perfectly zoomed-out to the max'. Your own Page, Your own JS and CSS is the way to go guys.

Opening url (blog) with scroll view

I've tried so many links and they all revert back to a web view.
I only just got Xcode and I'm pretty new to all this stuff, its complete different to C and Java.
Anyways, I have added a scroll view to my frame and gave it a class I've made myself (hopefully that works).
Now, when I load the application, I want it to be able to load a webpage (my blog) into the scroll view
any idea how?
Regards,
Ryan
You need to use a UIWebView for loading web pages. The scroll for UIWebView would automatically adjust according to the size of the webpage.

How to handle downloads in mobile site

How does one handle image downloads in a mobi site - using jquery mobile and asp.net mvc 3 and have a requirement to allow a user to download wallpapers to their mobile.
Can you trigger a download or is best to simply simple the image to them and let them handle the saving?
Any input appreciated.
Typically, you can force the download of content on standard browsers by setting headers
"Content-Disposition", "attachment; filename=\"LicenseAgreement.pdf\""
on the return. This SO shows how to return a PDF file but theoretically, you could do the same with an image.
How can I present a file for download from an MVC controller?
However, it is questionable if every browser that is supported by jquery mobile would even respect that and give any kind of a save prompt or just open the image in a new window. Give it a shot but test it on iOS, Android, WinPhone 7.5+, and (gagging) Blackberry 6+ and see what happens because they're probably going to all behave a little differently.
Were it me, I'd simply link directly to the image either on the current page or with a target="_blank" and let them save it however they usually save images.

Dashcode question - OnClick image to fullscreen?

I have a web app I'm building in Dashcode, currently every thing is working as advertised. I'm using the browser template and was able to modify it a bit, got the xml working to connect images and their description. Now I want to add a simple OnClick event that sends the image to fullscreen but I can't find any documentation for that. I'm pretty sure this is easily done so I'm missing something here? Any help greatly appreciated.
Tom
Taking over the screen is a bit complicated (if your talking about a full screen experience like youtube), but full screen in the browser window is defiantly possible. The simplest method is to have the click event open a link to the image location. This would load the image in full resolution in the browser window. A more elegant approach would be to load the image url into the source of a image dashcode object. and have that objects visibility only appear overs the whole web app when the Oncick event occurs. If you are talking about a built in function in dashcode to achieve a full screen/browser image, your out of luck.

AJAX Thumbnails

Does anyone know of any free frameworks that help you create thumbnails for web pages, that when clicked, the original image loads ontop of the page (modal like), as oppossed to opening a separate page.
Thanks!
This is really 2 questions in 1. The "lightbox" display of the original, larger sized, images in a modal box is handled in JavaScript with a library such as ThickBox. The resizing of the images can be done manually, or via some kind of code on the server side. Sitepoint has a decent guide on how to resize server side with PHP. I hope this helps point you in the right direction.
Lightbox.
http://planetozh.com/projects/lightbox-clones/
I've used DhoniShow a few times in the past, and clients really liked it. It's not AJAX, as it loads all the full sized images on page load, but if you were motivated I'm sure you could make that change pretty easily.
As have been already said, you can use Lightbox to get the effect to the user, I would use it with its ajax mode, loading the thumbnail as its contents.
Now for the thumbnail, I would recommend you something like http://megasnaps.com/ wich you can use for free.
Good luck.

Resources