c#.net ile bir aspx sayfası yaptım.
Kod: Tümünü seç
try
{
WebRequest request = WebRequest.Create(TextBox1.Text);
// If required by the server, set the credentials.
request.Credentials = CredentialCache.DefaultCredentials;
// Get the response.
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
// Display the status.
Console.WriteLine(response.StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();
// Display the content.
Console.WriteLine(responseFromServer);
// Cleanup the streams and the response.
reader.Close();
dataStream.Close();
response.Close();
TextBox2.Text = responseFromServer;
}
catch (Exception ex)
{
Response.Write("<script>alert('" + ex.Message + "')</script>");
}
Kod: Tümünü seç
Bir uyumlu web tarayıcısı kullanıyorsunuz.
Maalesef, tarayıcınızın desteklemek için yeterince iyi değil. Lütfen aşağıdaki tarayıcıları gerçek ile tutmak:
Mozilla Firefox
Opera
Safari
Microsoft Internet Explorer