TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Harish Batchu
NA
255
70.3k
I need to get table data from web page?
Oct 2 2018 5:17 AM
Hii Every one. I have on problem regarding the to get inforamation form other site.
I write the code below in c# program and get the output i need only the rates and country name i put the code below and sample output
protected void Page_Load(object sender, EventArgs e)
{
WebRequest myClient = WebRequest.Create("https://openexchangerates.org/api/latest.json?app_id=xxxxxxxxxxx");
WebResponse wRes = myClient.GetResponse();
// The stream data is used here.
StreamReader sr = new StreamReader(wRes.GetResponseStream());
string sHTML = sr.ReadToEnd();
sr.Close();
wRes.Close();
if(sHTML != string.Empty && sHTML != null)
{
Label1.Text = sHTML;
}
}
output:
{ "disclaimer": "Usage subject to terms: https://openexchangerates.org/terms", "license": "https://openexchangerates.org/license", "timestamp": 1538474400, "base": "USD", "rates": { "AED": 3.673281, "AFN": 76.106, "ALL": 109.38, "AMD": 484.706411, "ANG": 1.779787, "AOA": 296.373, "ARS": 39.4745, "AUD": 1.394272, "AWG": 1.799996, "AZN": 1.7025, "BAM": 1.689342, "BBD": 2, "BDT": 84.451957, "BGN": 1.69853, "BHD": 0.377056, "BIF": 1778.493104, "BMD": 1, "BND": 1.410207, "BOB": 6.928552, "BRL": 4.0181, "BSD": 1, "BTC": 0.000152807478, "BTN": 72.859277, "BWP": 10.644498, "BYN": 2.12019, "BZD": 2.015405, "CAD": 1.283236, "CDF": 1633.679466, "CHF": 0.983929, "CLF": 0.02338, "CLP": 658.8, "CNH": 6.889037, "CNY": 6.8689, "COP": 2986.551601, "CRC": 580.664427, "CUC": 1, "CUP": 25.5, "CVE": 95.44975, "CZK": 22.40872, "DJF": 178.05, "DKK": 6.47501, "DOP": 49.935, "DZD": 118.46889, "EGP": 17.9435, "ERN": 14.996267, "ETB": 27.819818, "EUR": 0.868418, "FJD": 2.128353, "FKP": 0.771845, "GBP": 0.771845, "GEL": 2.44699, "GGP": 0.771845, "GHS": 4.857661, "GIP": 0.771845, "GMD": 49.215, "GNF": 9070.306891, "GTQ": 7.694368, "GYD": 209.208993, "HKD": 7.835804, "HNL": 24.104997, "HRK": 6.449697, "HTG": 70.009613, "HUF": 281.068663, "IDR": 14628.778777, "ILS": 3.64803, "IMP": 0.771845, "INR": 73.46, "IQD": 1196.395029, "IRR": 43162.60868, "ISK": 112.640023, "JEP": 0.771845, "JMD": 134.416726, "JOD": 0.709503, "JPY": 113.72733333, "KES": 100.905527, "KGS": 68.137481, "KHR": 4093.896663, "KMF": 425.676038, "KPW": 900, "KRW": 1120.27, "KWD": 0.30366, "KYD": 0.835525, "KZT": 365.461009, "LAK": 8549.060853, "LBP": 1510.95, "LKR": 169.16, "LRD": 155.599505, "LSL": 14.133674, "LYD": 1.387895, "MAD": 9.4686, "MDL": 16.906265, "MGA": 3459.305383, "MKD": 53.405, "MMK": 1565.206254, "MNT": 2442.166667, "MOP": 8.084162, "MRO": 356.5, "MRU": 35.8, "MUR": 34.499933, "MVR": 15.410043, "MWK": 727.159811, "MXN": 18.841472, "MYR": 4.1422, "MZN": 60.699154, "NAD": 14.195, "NGN": 365.601483, "NIO": 32.186003, "NOK": 8.201923, "NPR": 116.900816, "NZD": 1.519526, "OMR": 0.385007, "PAB": 1, "PEN": 3.307857, "PGK": 3.344372, "PHP": 54.3605, "PKR": 123.25, "PLN": 3.728846, "PYG": 5908.940002, "QAR": 3.641082, "RON": 4.051976, "RSD": 102.822883, "RUB": 65.5012, "RWF": 887.342072, "SAR": 3.7506, "SBD": 7.88911, "SCR": 13.606273, "SDG": 18.048101, "SEK": 9.019599, "SGD": 1.375272, "SHP": 0.771845, "SLL": 8390, "SOS": 580.009023, "SRD": 7.458, "SSP": 130.2634, "STD": 21050.59961, "STN": 21.27, "SVC": 8.773284, "SYP": 514.96999, "SZL": 14.1294, "THB": 32.38, "TJS": 9.446865, "TMT": 3.50998, "TND": 2.810698, "TOP": 2.310538, "TRY": 6.026377, "TTD": 6.831174, "TWD": 30.662813, "TZS": 2284.9, "UAH": 28.281, "UGX": 3824.64041, "USD": 1, "UYU": 33.04364, "UZS": 8101.132125, "VEF": 248471.708907, "VES": 62.020637, "VND": 23117.432672, "VUV": 108.499605, "WST": 2.588533, "XAF": 569.644965, "XAG": 0.06898951, "XAU": 0.00083857, "XCD": 2.70255, "XDR": 0.714576, "XOF": 569.644965, "XPD": 0.00094925, "XPF": 103.629851, "XPT": 0.00121878, "YER": 250.300682, "ZAR": 14.378575, "ZMW": 12.559009, "ZWL": 322.355011 } }
Thanking you.
Reply
Answers (
3
)
For condition by comparing between 2 var. using %
How to use inputs inside a "for" loop