Integrate Moneybookers into WPF applications - c#

I would like to integrate moneybookers payment-gateway into a WPF-application. Accroding to the official gateway manual I need to redirect the user to the moneybookers payment-page and submit some fields posted within an html-form.
Has anyone an idea how I could solve this task?
Best regards!

Yes, all you need to do is:
Include a Frame control in your WPF application.
Include a .html file in your WPF application that contains a element with the appropriate data and some JavaScript to automatically post the form when the page is loaded.
When it is time for payment, have your display the Frame control and set its Url to the relative path of the .html file.
When the user is done paying you can give them a button to close the Frame yourself, or you can subscribe to the Navigated event on the Frame and when the payment processor causes them to navigate back to your fake HTML you can automatically close the Frame and use your own WPF UI to tell them "congratulations, thanks for paying".

Related

How to track action performed on web view content UWP

I have a WebView in UWP which is getting some html content (including javascript).
I need a way to track actions performed on the Webview content, for instance if the user has clicked a button I would like to know.
I know https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.webview.scriptnotify
but for this to work javascript has to call window.external.notify().
But the problem is that I don't own this content and it doesn't make sense to ask the owners to change their handler to publish this window.external.notify().
So, is there any way I can track all the user actions without modifiying the content?
I don't think you can accomplish what you're wanting to do with the UWP web viewer.
One alternative to consider is CefSharp which has a WPF implementation of Chromium.
It gives you a lot of hooks and handlers to intercept requests and do a lot of custom work on JavaScript that you don't control. I used it to build a WPF based help system and it allowed me to intercept links to PDFs and videos so that I could display them in special viewers.

Possible to show the URL-Bar in a Webbrowser control on Windows phone 7?

I am currently playing a little bit around with the development environment. At the moment I am writing a small app, which adresses a Webbrowser-Control.
Therefore I was looking for an opportunity, to show the URL-bar and maybe manipulating the URL via input of the user. Is this anyway possible, or not implemented for the webbrowser control?
Thanks in advance!
The WebBrowser control itself doesn't have a URL bar. It is simply a control that has the ability to display HTML and run Javascript. The easiest way way to simulate one would be to create a textbox. You can then use its Navigate method to load the webpage:
myWebBrowserControl.Navigate(myTextboxUrl.Text);
Alternatively, you can use the WebBrowserTask, but your app loses all control of the user's activities within this task.
I think it'd be easier to just launch the web browser task directly. Customizing the URL bar would probably require rolling your own.
Here's a related question about opening the browser: Open webbrowser with specific url in WP7

C# ASP.NET Detect Download

I am maintaining a website written in C# with ASP.NET. At the bottom of a page is an iframe. When a user clicks a button, the source for that iframe is set with Javascript to a page on the server.
showLoadWidget();
document.getElementById("downloadFrame").src='SdrTrendDownload.aspx';
return false;
That page generates a file and allows the user to download it. Once the download file box pops up, I want to call hideLoadWidget() so the 'Loading Data...' overlay goes away. How do I detect when the download file box pops up?
You can't detect that in addition this get more complicated depending on their security setting for the zone detected for your site
I will suggest that you just wrap the call inside updatepanel and use the partial postback to trigger the download prompt and progress template for displaying the loading widget. Let .net and the browser deal with it.
You can't, much less the browsers (like Chrome) who actually don't pop open a download file dialog. What you should probably do is simply attach to the 'ready' or 'loaded' event on the page and hide the widget when that event occurs.
Tejs is correct. IE 9 doesn't do a modal dialog anymore either. What you can do is set up a download progress watcher and programmatically hide the overlay once the watcher sees data is being sent to the client.
Can you use a hidden HTML form element reporting a DOM event such as onload or onfocus? I set some of these hidden fields in formmail.php from tectite.com, which sends email from a page to a mailbox on the server.
Well, I don't think you can do that. "The Download File Box" is a browser feature. What you should do is call the hideLoadWidget() right after you call the download.

to show loading while navigating a web page using c# .net browser

hiii
I am developing a window application in which I am showing a web page using c# .net browser. since my web page is quite heavy and its taking time to load . so i want to show loading image while navigating a web page .so tell me how should i do .
I assume that you are using the WebBrowser wrapper, is that correct?
You can use the ProgressChanged and/or Navigating + DocumentCompleted events.
As an asside:
Depending on the nature of your application you could pre-download parts of the page to improve the user’s pereption of the app’s responsiveness.
It may sound overly simple, but it might be the easiest solution to just add an image control with an animated bitmap to the form at runtime when the page starts loading. Once it's done, just hide the image again. This would also give you the flexability to display any messages you want and add effects/transitions to make it aesthetically pleasing.
Only since you asked so nicely.
You could just do this by monitoring both the navigating and the documentcompleted events of the webbrowser control. (Im sure you can fill in the blanks here).
Be sure when you use the documentcompleted event that you check the readystate :
theBrowser.ReadyState == WebBrowserReadyState.Complete
Otherwise the documentcompleted event will fire multiple times even before the entire page has loaded.
First create an image(give a name for it) and place it wherever you want it but make the Visibility to Collapsed.
Then in your browser_Navigating, add this code, ImageName.Visibility = Visibility.Visible;
and then in your browser_Navigated, add this code, ImageName.Visibility = Visibility.Collapsed;

ajax process control

Is there any builtin control in ajax to show process indicator. Like when i press copy button in my page one popup shuold come and show a small process animation gif.
is it possible in ajax using c#?
Some time ago I need to do this in my web site and I've found this page. Check this out and see if fits to your needs.
http://mattberseth.com/blog/
Cheers,

Categories

Resources