C# - Taking Screen Shot Of A (remote) Webpage Programmatically?
Mar 14, 2011I'm trying to take screen shots of web pages programmatically. I may also require to take screen shots of full or partial page. Is there a way to do this?
View 5 RepliesI'm trying to take screen shots of web pages programmatically. I may also require to take screen shots of full or partial page. Is there a way to do this?
View 5 RepliesIn Java we can do it as follows:
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import java.io.File;
...
public void captureScreen(String fileName) throws Exception {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Rectangle screenRectangle = new Rectangle(screenSize);
Robot robot = new Robot();
BufferedImage image = robot.createScreenCapture(screenRectangle);
ImageIO.write(image, "png", new File(fileName));
}
How do we do this in .NET from a webapplication? Capturing the client's screen and sending it to the server all from within the application.
I'm building a cms and I want users to be able to upload videos but I'm not familiar with video upload & conversion. Is there an example or has anybody coded a solution like this? I heard about ffmpeg but I don't know how to integrate it with asp.net.
As simple solution I can make my clients upload flv files but then I would still need to get a screenshot from that fvl.
i have a loging page, once i login into my application it is redirecting into main dash borad screen. where i am displaying data from other server. it is taking time to load page..
case 1:- in my dashboard one block i am displaying some simple info like alerts, news, mails count..etc.. that is comming from my local database ( there is no performance issues on that..)
case 2: in the same page (dashboard block) i am showing data, it is comming from another server.. first it will check the credentials and retrive data and displaying in same dashboard screen ( here it is taking time)
once hit the login button and redirecting into a dashbard screen using response.redirect("dashbard.aspx"); it is redirecting to dashbard screen..once all the process of page load is comple,,,then it is displaying the dashboard page what i am looking is first i want to redirect to the dashboard screen and then process the case1 ( simple data ) ..and for case2 i just want to show some ajax spinner image on the second block..
I want that my web page should open up in full screen. Is there any code that i can put in my page load event so that the browser should set itself to full screen i.e. same as F11.
View 2 Repliesi have a group page. i am creating a website for the group and they want to be able to see the recent facebook updates (what you see on the group's facebook wall) on their website. is this possible without having to have a facebook popup login and just programatically pass in my login information?
View 1 RepliesI wan't to connect to remote web page (that has login form) with HttpWebRequest. I am using this tutorial: http://www.byteblocks.com/page/How-to-submit-requests-to-web-sites-programatically-using-HttpWebRequest.aspx
,but I don't know where RequestAttributes class belongs to?!? Is there any better way to do this? The remote page is in ASP.NET, it's using Form authentication and when someone makes a request to default.aspx it redirects it to login page. I want to parse default.aspx page, but before I am able to do that, I need to pass credentials to login form via POST method in HttpWebRequest. Here is another example using POST method to pass parameters: http://www.worldofasp.net/tut/WebRequest/Working_with_HttpWebRequest_and_HttpWebResponse_in_ASPNET_114.aspx
but I don't understand why this does not work in ASP.NET remote page.
My Client has an application that is built in ASP.NET (c#) that makes use of a lot of ExtJS controls.
I need to enable the application to save every thing on the entry screen to a temporary storage mechanism and when necessary restore it.
The scenorio is the user has captured some data to a specific screen but is unable to continue and then there session expires.
It'll be hard to explain, but here goes...I have a 3-col table that measures 1200px wide... the middle column measures 800px and includes all the contents, and both remaining rows measure 200px each and have "nice-to-display-but-optional" images (each has a 200px image).On a 1400px display, my table will display with no problems. On the other hand, if the screen is 1000px, then it'll display the scrollbars so it can fit the 1200px of contents.
How can I set the table (or any other html container) so that a 1000px screen only displays what fits on the screen without displaying the scrollbar?In this case, a 1000px would display the middle 800px column, and whatever fits on the sides (half of the 200px images). But the scrollbars would not be displayed, and the images would not be altered so that they fit in the remaining space.
I need to get a perticular word from remote website.its a number and it is changable. but it cant be a char it must br a number .i just wants to locate that number.
Actually i have a project,in which user have to insert the url of his video and it could be on any website which allows to host videos(youtube,metacafe,etc...).now when user enters the link and press the button on that page he will able to see number of views of his video.
I am making some application in asp.net 1.1 in that I am displaying data in datagrid from database. In data grid first column is of check box and radio button and in the last column we have text box now thing is that when i click on check box crosponding textbox we fill some figure and at the end we press calculate button to get total. After getting total we have to press continue button to go next step
But suppose if some body remove that check the we should press calculate button or chnage some figure in the text box then we should press calculate button again to recalculate. for that i kept autopost back on check box oncheckedchanged event and text box ontextchanged event and hide continue button so user will click calcutae button abd then continue button will re-apper
Problem it that it taking too much refresh and taking long time. So was lloking for some ajax method to use in my application.
I have log files in different machines. Now i am developing a web page in my development machine (Windows XP, IIS 5.1 installed). In the web page i want to give a link(may be hyperlink or linkbutton). On clicking the link it should access the log file in the particular machine and it should give a popup with open and save option as given in the normal web applications. I am using the following code snippet but its throwing error "Cannnot resolve the URL"
Response.ContentType = "text/txt";
Response.AppendHeader("Content-Disposition", "attachment; filename=log.txt");
string str = ResolveClientUrl("\ip address\FolderName\logs\log.txt");
Response.TransmitFile(str);
Response.End();
Here FolderName is a shared folder in the machine(which ip address is mentioned).
When viewing the click in firebug, the call turns red (i.e. error) but I can't see the error because the page redirects.
So is it allowed to call a remote website (in my case, its a 1x1 image using a standard url like [URL]
I am deving a webpage. For testing purposes i want to access the webpage via my VM and possibly ask a friend to mess with it remotely. The app is running in visual studios 2008. I put set my router DMZ to my IP address and i tried connecting via VM and remotely. No luck. How do i config visual studios to listen outside of the machine?
View 3 RepliesAs example, I need my Panel to contain various number of CheckBoxes.
View 2 RepliesI am using C# code in an event handler for a button click event in a web page that I would like to have access another web page for the user to see after certain processing is completed. What C# code do I use to execute another page in the same website?
View 1 RepliesI am designing SAAS based application on .net MVC 2 platform. Left menu panel, header and footer are common for all pages. I want to avoid loading of these items on every single page. IN a sense I want to use AJAX at application level by refreshing content area ONLY on every click of menu item.
My question:
1)Will this be accomplised by having controls of all virtual web pages on one page and then control their hide and show behaviour depending on menu click? Is there any other better way?
2)What happens when we launch the app? Will it try to load all controls in one shot and hide it in backgrund? OR will it load controls of default page and then fetch what ever is requested via AJAX?
I wanted to maintain the great features of ASP security control but i couldn't find a way to fit my purposes. I wanted to add in multiple user in one shot instead of one by one, So far using CreateUserWizard control only allow admin to add user once at a time. Is there a way to add in multiple user with a uploaded name list ?
View 3 RepliesI have question regarding printer option page which pop up when i click on print button on crystalreportviewer and when i click okay on that pop up page it displays print preview of the report.
Is there any way to skip that pop up window(Printer Option) and just display (PDF)print preview screen instead?
(I am not exporting report to pdf, just want to display printview screen and when the user click on print button it will print out the page)
I have tried following code but i am getting error:
"Object reference not set to an instance of an object."
[code]....
I have upgraded web application from VS.2008 to vs 2010. I was using previously ReportViewer 2008 control in a page and replaced with 2010 ReportViewer Control.
I have installed the ReportViewer Redistributable also in my local pc as well as in the server. Also as per the new requirement I have placed the Scriptmanager in the web page where the reportviewer control located.
While running the page, the reportviewer run the report and is not showing the data on the screen. It shows the blank screen. But If I export the data to execl or world it is showing the data. Also the page numbers in the reportviewer showing the total pages available in the navigation bar. I am sure the report is running and bringing the data to the screen but not showing it.
The below is the exact scenario, One form will be there and when user click on "Edit" hyper link other window will open to get more details. In that new window also I have a grid or a table which has other hyperlink which lead to open other window and in that window I will enter few details and save it....
[code]....
I have created my first MVC application. I am using forms authenticataion. I have created a custom action filter MyAppAuthorizationFilter which inherits from AuthorizeFilter. Inside this filter I'm authenticating the user credentials by checking them against a database table (by overriding OnAuthorize method). If the user is not authenticated, I am redirecting the users to a login page (which is view of LoginController). I am using this filter agaginst my main controller so that all actions in this filter will execute only if the user is authenticated.
I do not have any problem when I use the asp.net development server (shipped with Visual Studio). But when I deploy the app to our IIS7 server, I can see the login screen when I access the default url, but after entering the credentials (both correct and incorrect) and posting back the Login page, it stays on the Login page (clears the pwd, but not the username). Its never getting redirected to the home screen or invalid login screen.
IIS 7 server has .net framework 3.5SP1, but no MVC. So I deployed the System.Web.Mvc dll in the bin folder.
Here's my Code (I've omitted the views and models as they are not needed here):
[MyAppAuthorizationFilter]
public class MainController : Controller
{
//
// GET: / [code]......
I am using the below code where I put this tag on a .aspx page:
"<a name="tips"></a>"
Now if I from another page run the code in the hyperlink to navigate to this page2 where I have the above tag. The page will scroll down to this tag automatically where this tag will be at the TOP of the screen.
My question now is if it is instead possible to scroll to the position where you have this tag at the BOTTOM of the screen instead ?
[Code]....
Is it possible to take a screen capture of a particular area of a web-page from the web-page's own ASP.NET code?
I need to display 6 images that are stacked on top of one another using CSS, and I'd like to offer the user the ability to right-click save-as if possible by stacking the screen capture on top top of the original image stack.
how i can open my asp.net program on full screen (like i press F11)
Through C# code ?