Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » Ajax » General » Downloads
 
Add your own
alternative version
Go to top

Displaying JQuery Progress using ASP.NET MVC with Ajax

, 25 Aug 2009
JQuery is a lightweight JavaScript library and can be downloaded from http://www.jquery.com. The jQuery library is also included in the Scripts folder of the Visual Studio ASP.NET MVC template.
CurrencyExchange.zip
CurrencyExchange
CurrencyExchange
App_Data
bin
CurrencyExchange.dll
CurrencyExchange.pdb
Content
ajax-loader.gif
Controllers
CurrencyExchange.csproj.user
Global.asax
Models
Properties
Settings.settings
Scripts
Views
Account
Home
Shared
Web References
net.webservicex.www
CurrencyConvertor.wsdl
Reference.map
CurrencyExchange.suo
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.3053
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.3053.
// 
#pragma warning disable 1591

namespace CurrencyExchange.net.webservicex.www {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="CurrencyConvertorSoap", Namespace="http://www.webserviceX.NET/")]
    public partial class CurrencyConvertor : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback ConversionRateOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public CurrencyConvertor() {
            this.Url = global::CurrencyExchange.Properties.Settings.Default.CurrencyExchange_net_webservicex_www_CurrencyConvertor;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            && (this.useDefaultCredentialsSetExplicitly == false)) 
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        /// <remarks/>
        public event ConversionRateCompletedEventHandler ConversionRateCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.webserviceX.NET/ConversionRate", RequestNamespace="http://www.webserviceX.NET/", ResponseNamespace="http://www.webserviceX.NET/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public double ConversionRate(Currency FromCurrency, Currency ToCurrency) {
            object[] results = this.Invoke("ConversionRate", new object[] {
                        FromCurrency,
                        ToCurrency});
            return ((double)(results[0]));
        }
        
        /// <remarks/>
        public void ConversionRateAsync(Currency FromCurrency, Currency ToCurrency) {
            this.ConversionRateAsync(FromCurrency, ToCurrency, null);
        }
        
        /// <remarks/>
        public void ConversionRateAsync(Currency FromCurrency, Currency ToCurrency, object userState) {
            if ((this.ConversionRateOperationCompleted == null)) {
                this.ConversionRateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnConversionRateOperationCompleted);
            }
            this.InvokeAsync("ConversionRate", new object[] {
                        FromCurrency,
                        ToCurrency}, this.ConversionRateOperationCompleted, userState);
        }
        
        private void OnConversionRateOperationCompleted(object arg) {
            if ((this.ConversionRateCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.ConversionRateCompleted(this, new ConversionRateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null) 
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024) 
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3053")]
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.webserviceX.NET/")]
    public enum Currency {
        
        /// <remarks/>
        AFA,
        
        /// <remarks/>
        ALL,
        
        /// <remarks/>
        DZD,
        
        /// <remarks/>
        ARS,
        
        /// <remarks/>
        AWG,
        
        /// <remarks/>
        AUD,
        
        /// <remarks/>
        BSD,
        
        /// <remarks/>
        BHD,
        
        /// <remarks/>
        BDT,
        
        /// <remarks/>
        BBD,
        
        /// <remarks/>
        BZD,
        
        /// <remarks/>
        BMD,
        
        /// <remarks/>
        BTN,
        
        /// <remarks/>
        BOB,
        
        /// <remarks/>
        BWP,
        
        /// <remarks/>
        BRL,
        
        /// <remarks/>
        GBP,
        
        /// <remarks/>
        BND,
        
        /// <remarks/>
        BIF,
        
        /// <remarks/>
        XOF,
        
        /// <remarks/>
        XAF,
        
        /// <remarks/>
        KHR,
        
        /// <remarks/>
        CAD,
        
        /// <remarks/>
        CVE,
        
        /// <remarks/>
        KYD,
        
        /// <remarks/>
        CLP,
        
        /// <remarks/>
        CNY,
        
        /// <remarks/>
        COP,
        
        /// <remarks/>
        KMF,
        
        /// <remarks/>
        CRC,
        
        /// <remarks/>
        HRK,
        
        /// <remarks/>
        CUP,
        
        /// <remarks/>
        CYP,
        
        /// <remarks/>
        CZK,
        
        /// <remarks/>
        DKK,
        
        /// <remarks/>
        DJF,
        
        /// <remarks/>
        DOP,
        
        /// <remarks/>
        XCD,
        
        /// <remarks/>
        EGP,
        
        /// <remarks/>
        SVC,
        
        /// <remarks/>
        EEK,
        
        /// <remarks/>
        ETB,
        
        /// <remarks/>
        EUR,
        
        /// <remarks/>
        FKP,
        
        /// <remarks/>
        GMD,
        
        /// <remarks/>
        GHC,
        
        /// <remarks/>
        GIP,
        
        /// <remarks/>
        XAU,
        
        /// <remarks/>
        GTQ,
        
        /// <remarks/>
        GNF,
        
        /// <remarks/>
        GYD,
        
        /// <remarks/>
        HTG,
        
        /// <remarks/>
        HNL,
        
        /// <remarks/>
        HKD,
        
        /// <remarks/>
        HUF,
        
        /// <remarks/>
        ISK,
        
        /// <remarks/>
        INR,
        
        /// <remarks/>
        IDR,
        
        /// <remarks/>
        IQD,
        
        /// <remarks/>
        ILS,
        
        /// <remarks/>
        JMD,
        
        /// <remarks/>
        JPY,
        
        /// <remarks/>
        JOD,
        
        /// <remarks/>
        KZT,
        
        /// <remarks/>
        KES,
        
        /// <remarks/>
        KRW,
        
        /// <remarks/>
        KWD,
        
        /// <remarks/>
        LAK,
        
        /// <remarks/>
        LVL,
        
        /// <remarks/>
        LBP,
        
        /// <remarks/>
        LSL,
        
        /// <remarks/>
        LRD,
        
        /// <remarks/>
        LYD,
        
        /// <remarks/>
        LTL,
        
        /// <remarks/>
        MOP,
        
        /// <remarks/>
        MKD,
        
        /// <remarks/>
        MGF,
        
        /// <remarks/>
        MWK,
        
        /// <remarks/>
        MYR,
        
        /// <remarks/>
        MVR,
        
        /// <remarks/>
        MTL,
        
        /// <remarks/>
        MRO,
        
        /// <remarks/>
        MUR,
        
        /// <remarks/>
        MXN,
        
        /// <remarks/>
        MDL,
        
        /// <remarks/>
        MNT,
        
        /// <remarks/>
        MAD,
        
        /// <remarks/>
        MZM,
        
        /// <remarks/>
        MMK,
        
        /// <remarks/>
        NAD,
        
        /// <remarks/>
        NPR,
        
        /// <remarks/>
        ANG,
        
        /// <remarks/>
        NZD,
        
        /// <remarks/>
        NIO,
        
        /// <remarks/>
        NGN,
        
        /// <remarks/>
        KPW,
        
        /// <remarks/>
        NOK,
        
        /// <remarks/>
        OMR,
        
        /// <remarks/>
        XPF,
        
        /// <remarks/>
        PKR,
        
        /// <remarks/>
        XPD,
        
        /// <remarks/>
        PAB,
        
        /// <remarks/>
        PGK,
        
        /// <remarks/>
        PYG,
        
        /// <remarks/>
        PEN,
        
        /// <remarks/>
        PHP,
        
        /// <remarks/>
        XPT,
        
        /// <remarks/>
        PLN,
        
        /// <remarks/>
        QAR,
        
        /// <remarks/>
        ROL,
        
        /// <remarks/>
        RUB,
        
        /// <remarks/>
        WST,
        
        /// <remarks/>
        STD,
        
        /// <remarks/>
        SAR,
        
        /// <remarks/>
        SCR,
        
        /// <remarks/>
        SLL,
        
        /// <remarks/>
        XAG,
        
        /// <remarks/>
        SGD,
        
        /// <remarks/>
        SKK,
        
        /// <remarks/>
        SIT,
        
        /// <remarks/>
        SBD,
        
        /// <remarks/>
        SOS,
        
        /// <remarks/>
        ZAR,
        
        /// <remarks/>
        LKR,
        
        /// <remarks/>
        SHP,
        
        /// <remarks/>
        SDD,
        
        /// <remarks/>
        SRG,
        
        /// <remarks/>
        SZL,
        
        /// <remarks/>
        SEK,
        
        /// <remarks/>
        CHF,
        
        /// <remarks/>
        SYP,
        
        /// <remarks/>
        TWD,
        
        /// <remarks/>
        TZS,
        
        /// <remarks/>
        THB,
        
        /// <remarks/>
        TOP,
        
        /// <remarks/>
        TTD,
        
        /// <remarks/>
        TND,
        
        /// <remarks/>
        TRL,
        
        /// <remarks/>
        USD,
        
        /// <remarks/>
        AED,
        
        /// <remarks/>
        UGX,
        
        /// <remarks/>
        UAH,
        
        /// <remarks/>
        UYU,
        
        /// <remarks/>
        VUV,
        
        /// <remarks/>
        VEB,
        
        /// <remarks/>
        VND,
        
        /// <remarks/>
        YER,
        
        /// <remarks/>
        YUM,
        
        /// <remarks/>
        ZMK,
        
        /// <remarks/>
        ZWD,
        
        /// <remarks/>
        TRY,
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053")]
    public delegate void ConversionRateCompletedEventHandler(object sender, ConversionRateCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.3053")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class ConversionRateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal ConversionRateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public double Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((double)(this.results[0]));
            }
        }
    }
}

#pragma warning restore 1591

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Farooq Kaiser
Software Developer (Senior) http://www.Fairnet.com
Canada Canada
12+ years of complete software development life cycle experience for web based applications and multi-tier client-server desktop, primarily using LINQ, WCF, WWF, C#, ASP.NET, XML, XSLT, AJAX, Winforms,Visual Basic, JavaScript, JQuery, Google APIs, C++, VB.NET, C, ATL/COM, Open XML. Extensively involved in the requirement analysis, feasibility study, conceptualization, planning, architecture/design, configuration, development, quality assurance, implementation and release of the software products.

| Advertise | Privacy | Mobile
Web01 | 2.8.140921.1 | Last Updated 25 Aug 2009
Article Copyright 2009 by Farooq Kaiser
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid