ajax process control - c#

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,

Related

How can I open a webpage first and then fill in text boxes and click a button and visibly view the results?

[edit] It is a requirement that the webpage spawn and open in IE and allow user manual interaction after the programmatic actions have completed.[/edit]
I've seen a lot of code examples online about opening webpages or filling in webpage textboxes and getting a return value without ever opening them visibly.
I would like to open a webpage in IE, fill in a few textbox buttons
and then click the submit button and view the results visibly.
I am able to do this with a dll called Selenium, but I do not want to use a 3rd party application and it seems that WebBrowser() should be able to do this?
I can post my failed code examples if that would help.
Thanks.
Maybe this qould fit better as a comment, but I don't have enoigh reputation.
Do you know how HTTP-Forms work?
It would probably be easier to send a HTTP-Request to the target of the form you want to fill, including the parameters you would like to fill into the form.
So you don't need any WebBrowser or similar, just a simple HttpWebRequest object, where you specity the target, the method (very likely POST) and the data you'd like to send.
You can use the webbrowser control in Winforms. It is possible to access every DOM object of the website using the control. No need to open the IE externally.
You just need to specify the webbrowser URL as your link.
Then, fill the textboxes with code,
BrowserID.Document.GetElementById("TextboxID").SetAttribute("Value", "NewVaue")
Also, you can click on the button using InvokeMember("click").
There are lots of stuff using WebBrowser. You can learn it here.

Update Textbox in page (real time)

I'm edited my question,
I have a submit button and textbox in Default.aspx page. I'm open two window Default.aspx. I want to input text into textbox and press submit in this window, other window will update textbox real time.
Please help me !
What you are looking for is similar to chat application.
On receiving a value from one client(browser window), you want to send it to another.
Take a look at SignalR is a good option to keep push data to connected clients.
However if you do want to do it yourself for some reason, the most efficient method to build this in asp.net is to use a IHttpAsyncHandler and ajax requests.
Here is a complete working project that implements this, along with ajax.

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.

Integrate Moneybookers into WPF applications

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".

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;

Categories

Resources