I am creating a program that will schedule classes for me for my upcoming semester, and I have everything working in regards to inputting my username, password, and Schedule ID, however I want it to work as fast as possible. I did some research into disabling images from being downloaded, but have yet to come to a conclusion.
So basically, I want to request the website, but I don't want none of the 'fancy' UI such as images, animations, etc... I just want plain text and the respective fields. Is this even possible using VS WebBrowser? Would this be along the lines of just gathering the HTML and no CSS/JS?
Thanks for reading! Any hints or help in the right direction would be muchas gracias!
As it turns out, this is not possible in a "nice way." The images are loaded and requested after the html loads, and so there would have to be a way to disconnect or abort the request, just after we recieve all of the html. Digging around, you cannot do this natively in VS' WebBrowser.
Related
I am creating a web application and I want to print contents of my webpage. I have seen quite a lot of videos and support forums but I cant find what I'm looking for.
Basically PrintDialog is not available in my Visual Studio 2013 toolbox, is there any way of getting it?
Or if possible not use PrintDialog because I cant find it. I have been using C#.
I just want to know the simplest way to print.
P.S I am new at coding, any help and suggestions would be greatly appreciated.
Thank you all
New Info ----
Sorry I should have been more clearer, basically I have different reports on my web page and i want users to be able to print the individual reports. They are mini reports in one page in different sections, I want to be able to print seperate sections
Because the PrintDialog is for forms applications.
Each browser has its own printing implementation that you cannot influence.
To print the content of a webpage, you use the BROWSER's printdialog. In VERY OLD DAYS people added a "Click here to print" on websites, but actually you can just call:
window.print();
from Javascript OR press [CTRL+P] (or whatever key the browser you are using wants) or use the menues in the browser where there will be a print function available too.
The problem is that you dont instantiate the print from a HTML-server aka a webserver, and if you want to simulate that behaviour anyways, you will need a script, like Javascript in the page that will call the window.print() function.
This will still bring out the Printdialog and the user will still need actively to choose to actually print the thing, so you cant force it out on paper from server/site.
Think of the browser as a viewer/reader. Nothing else, and the server as the document storage.
Is it possible to have a website displayed on two seperate machines but to syncronise the users input on either machine to the other?
Basically any anchor clicks, image zooms, javascript pop out menus etc need to also occur on the other users screen and vice versa.
In my case the site will be developed in c#.NET but how would one approach something like this, would you use javascript or a database or some other method?
Having spent a long time looking into this I've found a solution, SignalR - http://signalr.net/ for ASP.NET allows you to do exactly what I require, I won't go into detail here as the post would become huge but for anyone wanting to do the same in future then visit http://signalr.net/ and have a read, it's amazing technology!
I have a page which contains user controls with Telerik Charts (grids also, but they work fine). From this page, the user can click on a button to be redirected to a "Printer-Friendly Version" type page, which opens a new window via javascript and goes through a slightly different view (for formatting and stuff), but the telerik code is all the same.
The problem is, my Chart displays just fine in the original window, but the new window displays basically an empty chart with no data. This bug is only present in IE, and only applies to Charts. Grids work fine, for whatever reason. I'm thinking this is due to differences in script caching between browsers -- correct me if I'm wrong, I'm semi-new to client-directed web development.
Anyway I read somewhere that Telerik has issues with loading data and/or js files when loaded via ajax, so maybe that's the problem? If so, how could I get around this? And if not, any ideas on what could be causing this issue? It's causing me a great deal of frustration, since a print preview page seems like it should be the easiest of jobs.
Edit:
The charts are being rendered as html (if somebody can explain how to render them as images, that would be awesome). And dev tools shows basically the same thing between chrome and IE. Whenever my web service goes back up ill WinMerge them and look for any peculiarities/differences between them. In the mean time, though, the "render as an image" concept sounds promising. That way I could just save the image from the first page, and insert it right into the print preview page, right?. And since it's a print-preview page, it's not going to need to be interactive or anything, so that'd work out nicely.
Another (important) Edit:
These are probably the culprit...
And here is a little more detail on that:
And here is a side-by-side of it working(in chrome) and not working (in IE):
Have you considered using a print-specific stylesheet instead, e.g.
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
In which you specify the styling to apply when printing.
That way, you avoid reloading the page (duplicate database hits, etc.) and don't need to delve into the AJAX of Telerik's controls.
EDIT:
Regarding using an image rather than HTML, first make sure you won't lose any features/detail, then check out the .Save() method of the RadChart control. You could either save it to a memory stream, or if you want to re-use the image save it to a directory on the webserver and clean it up periodically. That way, you can just point your print version to the image and not re-generate it.
This Telerik forum post may be of use.
So i created a web site a long time ago using a designer alot like frontpage + expression design put together, and since then Ive gotten more into coding, and I'm learning html, CSS, and all that good stuff.. and i have this re-designed header that Ive made here:
http://prntscr.com/8zct
So what I need to know, is how i can get it so that when a user clicks on one of the links in the header design it will redirect to a page. and also if possible, how to make it so when a user hovers over a link a drop down may appear with other options, EDIT: I'd like to be able to add a backround image to the drop down navigation menu
As me being quite new to this sort of stuff, could anybody help me achieve this?
PS. I'm working in Visual Studio with ASP. but that doesn't change anything about the html and css stuff. just letting you guys know.
To navigate based on clicks on certain areas of an image, read about image maps.
To create menus and other active components, read about JavaScript (also recommended: jQuery).
You can also create divs that are clickable to use as hot spots on an image. that way you could add a background image to that div if ti's hovered/clicked, whereas image maps does not afford you that opportunity.
Im a c# developer and I believe that what I want to achieve is going to move out of the realms of some drop in .NET component so I am looking for advise on what I use externally which .NET can inter op with.
My requirements are to have an embedded web browser control in a WPF/Winforms applciation BUT I will also need to keep track of the following:
User interaction i.e. what pages they visit, forms submitted where they click etc.
DOM manipulation and traversing
I am guessing here but it seems that I might need to start looking at open source html/web browsers out there like WebKit etc. Is this the right track or is there anything currently available in the form of a control/COM object that I can use directly.
Cheers, Chris.
You should be able to accomplish point 1 using the webbrowser control in Visual Studio, but I dont think DOM manipulation is available, i do know you can traverse all the tags.
reference