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
Vinod Kumar
NA
19
22.4k
i have one url of japan when i my craweling the site then give problem of encode the reponse url is http://www.alamo.jp
Feb 6 2013 4:20 AM
HttpWebRequest webReq = null;
HttpWebResponse webRes = null;
webReq = (HttpWebRequest)(WebRequest.Create("http://www.alamo.jp/"));
webRes = (HttpWebResponse)webReq.GetResponse();
Stream resStream = webRes.GetResponseStream();
String strResponse = resStream.ToString();
string Result = string.Empty;
StringBuilder StrgBuilder = new StringBuilder();
byte[] Buffer = new byte[8192];
int Count = 0;
do
{
Count = resStream.Read(Buffer, 0, Buffer.Length);
if (Count != 0)
{
Result = Encoding.ASCII.GetString(Buffer, 0, Count);
StrgBuilder.Append(Result);
}
} while (Count > 0);
Result = StrgBuilder.ToString();
// Result = Regex.Replace(Result, "<HEAD>", "<HEAD> <base href=\"http://www.avis.com/\">", RegexOptions.IgnoreCase);
////StreamWriter sw = new StreamWriter("C://yahoo.html", false, Encoding.UTF8);
//sw.Write(Result);
return Result;
Reply
Answers (
0
)
report viewer and stored procedure
copy image in picture box