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
71k
I need information regarding to get the live currency of di?
Oct 9 2018 8:52 PM
1. I have on requirement to display live currency data and sencex data in my web application is their any free api to get the information.
2. I need to send otp to user i have two types of sanple code but it's does not working can give me the solution. i will share the code.
Thanks in advance
#1
Public
string
APICall(strig url)
{
WebClient client =
new
WebClient();
Stream s = client.OpenRead(
string
.Format(url));
StreamReader reader =
new
StreamReader(s);
string
result = reader.ReadToEnd();
return
result;
}
[HttpPost]
public
string
GetSecuredData(
string
userName)
{
string
url =
"Here I am passing the url"
;
string
securedInfo =
""
;
string
js = Apicall(url);
if
(js !=
"0"
)
securedInfo =
"OTP Send Success"
;
else
securedInfo =
"please try again."
;
return
securedInfo;
}
#2 Model
public
String Apicall(
string
url)
{
HttpWebRequest httpreq = (HttpWebRequest)WebRequest.Create(url);
try
{
HttpWebResponse httpres = (HttpWebResponse)httpreq.GetResponse();
StreamReader sr =
new
StreamReader(httpres.GetResponseStream());
string
results = sr.ReadToEnd();
sr.Close();
return
results;
//}
catch
{
return
"0"
;
}
[HttpPost]
public
string
GetSecuredData(
string
userName)
{
string
url =
"Passing url"
string
js = Apicall(url);
if
(js !=
"0"
)
securedInfo =
"OTP Send Success"
;
else
securedInfo =
"please try again."
;
return
securedInfo;
}
Reply
Answers (
3
)
Asp.net mvc 5 EF code first follow implementation
how to bind grid view in mvc