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
Anilananda Chakrabortty
NA
425
78.7k
Calling URL from code behind C# in asp.net
Feb 19 2019 1:09 AM
HI guys ,
"http://www.google.com/transliterate/indic?tlqt=1&langpair=en|hi&text=" + HttpUtility.UrlEncode("India") + "&from=en&to=hi;
I have some issue when i am calling this url from code behind .
The remote server returned an error: (404) Not Found this error i'm getting.
but if i directly put this URL then it is working file is also downloading.
Here is my code
uri = "http://www.google.com/transliterate/indic?tlqt=1&langpair=en|hi&text=" + HttpUtility.UrlEncode("India") + "&from=en&to=hi;
HttpWebRequest translationWebRequest = (HttpWebRequest)WebRequest.Create(uri);
WebResponse response = null;
response = translationWebRequest.GetResponse();// in this line error is coming
Stream stream = response.GetResponseStream();
Encoding encode = Encoding.GetEncoding("utf-8");
StreamReader translatedStream = new StreamReader(stream, encode);
Can any one help me ... how to solve this error!
Reply
Answers (
3
)
SAVE button modal loading
Gridview Dropdownlist value show in label