I would like to use a java model. This is model of a human body. It has been written in Java, but I have to use it in ASP.NET. How can I do this? I tried the IKVM open source program. When I created a .dll I got a lot of not found warning. I have already installed the java sdk, and the eclipse. I could run java method under .NET. But I need a full model. Any idea?
Perhaps, - Could you please describe your setup in more detail?
What i gather from your question is that you have an ordinary ASPX page. In this page you would like to host a Java applet.
One suggestion could be to show the applet in an iFrame (read: no need for special DLL's).
In this case you could make a seperate HTML page embed the Applet as usual (:there are tons of howtos out there). And show it in the iFrame.
With this setup you might run in to issues with cross-side scripting, to fix this make sure that the host HTML page is loacted in the same domain as the ASPX page.
Good luck
Related
I'm trying to scrape a particular webpage which works as follows.
First the page loads, then it runs some sort of javascript to fetch the data it needs to populate the page. I'm interested in that data.
If I Get the page with HtmlAgilityPack - the script doesn't run so I get what it essentially a mostly-blank page.
Is there a way to force it to run a script, so I can get the data?
You are getting what the server is returning - the same as a web browser. A web browser, of course, then runs the scripts. Html Agility Pack is an HTML parser only - it has no way to interpret the javascript or bind it to its internal representation of the document. If you wanted to run the script you would need a web browser. The perfect answer to your problem would be a complete "headless" web browser. That is something that incorporates an HTML parser, a javascript interpreter, and a model that simulates the browser DOM, all working together. Basically, that's a web browser, except without the rendering part of it. At this time there isn't such a thing that works entirely within the .NET environment.
Your best bet is to use a WebBrowser control and actually load and run the page in Internet Explorer under programmatic control. This won't be fast or pretty, but it will do what you need to do.
Also see my answer to a similar question: Load a DOM and Execute javascript, server side, with .Net which discusses the available technology in .NET to do this. Most of the pieces exist right now but just aren't quite there yet or haven't been integrated in the right way, unfortunately.
You can use Awesomium for this, http://www.awesomium.com/. It works fairly well but has no support for x64 and is not thread safe. I'm using it to scan some web sites 24x7 and it's running fine for at least a couple of days in a row but then it usually crashes.
I have downloaded a free flash template from http://www.flashmo.com/preview/flashmo_197_bokeh
I want to use this template in my asp.net (C#) website. More specifically speaking, I want to use that color effect ( the color-change that is happening there in the background of the page) in my webpage.. Please help me to do so..
(Please do check the link I have provided. It will help you understand the color-change I am talking about).
Thanks in advance.
This should be fairly straight forward.
Just embed the downloaded swf file in the aspx page as you would with a regular html page.
See an example on: How to embed a swf file into html code?
The hard part is going to be interacting with the swf. This is possible via Javascript, but is gona take some work. In flash action script you can expose variables to javascript. Once that is done, you can call asp.net code from javascript. Both techniques are very well documented on the net. Just google on it.
Good luck ...
Please don't use flash to create a website and don't use 'attractive' to describe a website.
There is a requirement for us to implement browser testing for html and aspx pages. I came across xbrowser at the below link.
http://xbrowser.codeplex.com/
I couldn't find any documentation on their website , it has only solution file. I downloaded the code but its not running fully.
Any help or guidence will be really appreciated.
XBrowser isn't based on Trident (IE), WebKit (Safari/Chrome), Gecko (Firefox) or any other common rendering engine so as far as "browser testing" its pretty much useless. What it is intended for is website automation. You can instantiate it in code, tell it to navigate to a webpage and then tell it various things such as "enter xyz into the search field and click the submit button". If this is what you're looking for then its also very important to understand that just because what you've tested works in XBrowser doesn't mean it will work anywhere else. It might, it might not, you won't know until you manually test every browser.
If you follow the link at the top of the codeplex site you'll see that the project has been moved to GitHub. From there the author has a link to an earlier project call SimpleBrowser that has some examples that I imagine are similar to XBrowser.
I want to make a program that will simulate a user browsing a site and clicking on links. Cookies and javascript have to be enabled. I've successfully done this in python, but I want to write it an compilable language (python ide's don't cut it). The links on the site are generated with javascript and are dynamic. With python I used PAMIE (third party module that uses win32com) to launch an instance of Internet explorer, scrape the generated html for the links, then navigate to one of them. The point is for the whole process to be transparent to the server. What's the best (compilable) language and method to do this? I was thinking C# with WebBrowser control but I don't want to spend a lot of time learning something if it isn't going to work. Any kind help is appreciated!
You might want to look at the automated testing via browser suites:
http://www.teknologika.com/blog/the-holy-grail-net-automated-web-gui-testing-for-internet-explorer/
http://watin.sourceforge.net/
I wrote a blog post on this awhile back: Web scraping in .NET. That discusses cookies but not JavaScript; I don't know if that would require additional coding.
Might be worth having a look at selenium .
We use it for web testing in a C# asp.net envirnorment.
The documentation isn't to bad
I know i can use AJAX and SILVERLIGHT with my ASP.NET web page. But what do you think about using flash with asp.net? Can this be done? How can this be done? Would you recommend me using flash at all with ASP.NET? I will NOT be using WEB SERVICES, just a plain ASP.NET website.
Thanks in advance!
EDIT: What about performance issues???
I have used Flash in ASP.NET websites plenty.
Software should always boil down to the best tool for the job, if Flash is the way you need to go for your RIA, then so be it.
Remember, ASP.NET is nothing "new/different" ultimately, it is just a fancy HTML generator.
Therefore, to use flash, you simply use the plain old HTML OBJECT and EMBED tags to place the Flash on the page.
The benefit of using things like ASP.NET (or any other framework) is that you can encapsulate the EMBED logic to use things like swfObject.
flash is client side, what you use server side has very little impact on it.
Given Flash's high market penetration (98%+), I think Flash is a great way to go regardless of the underlying platform.
But, as with everything, it depends on what you want to do. If you want to deliver a rich user interface via Flash, you should consider using Flex.
There are several tools to help integrate a Flash/Flex application with ASP.NET. One of these that I recommend is WebORB.
It certainly can be done! We've done entire flash-based websites in the past that rely on data generated by a CMS and read from flash via XML. There are of course lots of gotchas (loading html text, multilingual characters), but once you've done it a few times you'll get the hang of it.
Flex is probably a better option.