Can any one help me on how to create a thumbnail from a url.
when the user saves a link, i want to show the screenshot of the web page as a thumbnail
i am using asp.net 2.0
Thank You
If you need to do this yourself, you can use the Winforms WebBrowser control in an ASP.NET application, with a few caveats:
It needs to run in a single threaded apartment thread
It might not work on all pages, such as pages which require Javascript or Flash interaction
Here are a few links to some walkthroughs:
Build A Self-Caching ASP.NET Web Site Thumbnail Control
How To Get Web Site Thumbnail Image In ASP.NET
I'd look at using a webservice like thumbalizr or WebShotsPro.
alt text http://beta.thumbalizr.com/app/thumbs/?src=/thumbs/onl/source/78/78f5e5a94c19c2999b1dc6eec3a2f2bf.png&w=640&q=0&enc=
Related
I have this situation in my SL4 application: We create some User Accounts in the Silverlight APP, now we want to generate printable reports for the generated accounts which we will hand out to the users. The idea is to save the information from the created account to a database, redirect from the Silverlight App to an ASP.NET page passing the ID of the stored account information and display the data in a report viewer control in asp.net from where it can be printed and exported.
Is this possible or am I completely wrong? How can I redirect from silverlight to the asp.net page and how can I pass the ID?
You can use Window.Navigate to do the same. For example,
// Navigate to the web page
System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(”http://www.xyz.com/report.aspx”));
//Open in a separate window
System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(”http://www.xyz.com/report.aspx”), “_blank”);
You can pass the id using the query-string.
See this SO question that discusses other options: redirect to another page from Silverlight
I have a different way of showing reports in a Silverlight application. I make use of the Acrobat Reader plugin to do the displaying for me. It does require a different method depending on whether your application is running inside or outside the browser (I check if the application is running inside the browser and change the means of display accordingly). If running inside the browser, I overlay the application with an IFrame, as I describe in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Otherwise, I use the WebBrowser control. I have a control which does this all for you in the source code that accompanies my book, which is downloadable from the Apress website here: http://www.apress.com/9781430272076/.
NOTE: I copied this answer from my previous response to a similar question here: Show pdf inside silverlight application. PDF to XAML
Suppose that your ASP.NET MVC website contains a handful of dynamic pages and a big amount of static pages that of course need the Login & Register link on the top right corner. How do you handle this?
We have converted the HTML pages to ASPX and introduced the ASP.NET code to display the user name but I am not sure that it's the best approach. In addition we needed to move static pages to a different folder to avoid collision with MVC routing.
Is this the best that can be done?
Thanks.
ASP.NET MVC and Web Forms can live together with no problem. If your approach is working out for you then it should be fine.
Also see the below article. It might help :
Integrating ASP.NET MVC 3 into existing upgraded ASP.NET 4 Web Forms applications
http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx
I believe as long you implement Donut caching within the ASP.Net pages you can get similar performance as static html pages.
If you use IIS Form Athentication for your site static content can be accessed only if the user is authenticated, so you can mantain HTML files and do not convert them in ASPX, but you need to add some javascript to hide the login link and display username (you can check the auth cookie of IIS or create your custom cookie).
Have you considered some client side script that loads the username/password section you need?
You could have it load a view and inject it into a div. Then you have a single point to maintain for all the static content.
I have a WinForms .NET component that can render and save JPG images. How can I make it work on my ASP.NET website each time a visitor requests a page?
Do I need write a web service?
Do I need to run a winforms app on the server and interact with it?
Do I need to host it on a separate ASP.NET page and query it to render and save new images?
Thanks.
EDIT: I am looking for a solution that doesn't need any control to be downloaded but simply a page refresh to display the new image.
Simple way to expose a .NET WinForm control as an ActiveX control in any HTML or aspx page
http://www.codeproject.com/KB/miscctrl/htmlwincontrol.aspx
I created simple Silverlight Application using the web site host of the VS2010 ( default ) feature.
Now, I want to make the Silverlight Application to be shown as light window in the front of the default web site.
How can i do it ?
You can go OoB.
If you just wanted to show a modal dialog, then use the ChildWindow or MessageBox.
I think you could also remove the website from your solution and the Silverlight project will still open in the browser.
I am not so sure about what you mean by "Light Window", but I am sure these links will help you a lot:
Integrating Silverlight with a Web Page
How to: Add Silverlight to a Web Page by Using HTML
Update
If you checkout the web-host project, you'll see, that there is a test page that actually hosts the Silverlight project.
You can modify this page and move the Silverlight content around wherever necessary, or you might even embed it in a master page and/or use an external ASP.NET UserControl that will be used to load/host the Silverlight object dynamically.
how could i dynamically generate few thumbnail of my site's home page and shows them in another page. please help
it can be done using WebBrowser control in .NET framework 2.0
here are some other links
Build A Self-Caching ASP.NET Web Site Thumbnail Control
Creating Website Thumbnails in ASP.NET
or a third party web service like WebShots or thumbalizr