Click here to Skip to main content
15,909,652 members
Home / Discussions / C#
   

C#

 
AnswerRe: Sleek looking window application Pin
_Maxxx_21-May-09 17:32
professional_Maxxx_21-May-09 17:32 
GeneralRe: Sleek looking window application Pin
humayunlalzad22-May-09 5:21
humayunlalzad22-May-09 5:21 
QuestionHow to get custom attributes from a function called by delegate? [modified] Pin
Anindya Chatterjee21-May-09 11:24
Anindya Chatterjee21-May-09 11:24 
Questiondatagrid reorder Pin
michaelgr121-May-09 10:19
michaelgr121-May-09 10:19 
AnswerRe: datagrid reorder Pin
Luc Pattyn21-May-09 10:30
sitebuilderLuc Pattyn21-May-09 10:30 
AnswerRe: datagrid reorder Pin
michaelgr121-May-09 19:40
michaelgr121-May-09 19:40 
GeneralRe: datagrid reorder Pin
Luc Pattyn22-May-09 2:05
sitebuilderLuc Pattyn22-May-09 2:05 
QuestionHttpWebRequest and something to do with security level... Pin
SimpleData21-May-09 9:21
SimpleData21-May-09 9:21 
Hi I am trying to POST some data to a webpage by using HttpWebRequest. But the webpage tells me that my security level is too high and I should check my browser settings.

How can I solve this? It is really urgent.

My code (if you need it):
Uri adres = new Uri("http://*********/****.asp");
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(adres);

request.Method = "POST";

// Taking cookies from webbrowser
request.CookieContainer = new CookieContainer ();
request.CookieContainer.SetCookies(adres, webBrowser1.Document.Cookie);

string postData = "*********************";

byte[] byteArray = Encoding.UTF8.GetBytes (postData);
// Set the ContentType property of the WebRequest.
request.ContentType = "application/x-www-form-urlencoded";
// Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length;
// Get the request stream.
Stream dataStream = request.GetRequestStream ();
// Write the data to the request stream.
dataStream.Write (byteArray, 0, byteArray.Length);
// Close the Stream object.
dataStream.Close ();
// Get the response.
WebResponse response = request.GetResponse ();
// Display the status.
//MessageBox.Show (((HttpWebResponse)response).StatusDescription);
// Get the stream containing content returned by the server.
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.
StreamWriter sr = new StreamWriter(@"C:\Users\Admin\Desktop\response.html");
sr.Write(responseFromServer);
sr.Close();
sr.Dispose();

// Clean up the streams.
reader.Close ();
dataStream.Close ();
response.Close ();


Thanks in advance.
AnswerRe: HttpWebRequest and something to do with security level... Pin
Manas Bhardwaj21-May-09 11:12
professionalManas Bhardwaj21-May-09 11:12 
GeneralRe: HttpWebRequest and something to do with security level... Pin
SimpleData22-May-09 3:20
SimpleData22-May-09 3:20 
Questionhow to ceate event_click for button with C# ? [modified] Pin
xingselex21-May-09 9:18
xingselex21-May-09 9:18 
AnswerRe: how to ceate event_click for button with C# ? Pin
Luc Pattyn21-May-09 10:15
sitebuilderLuc Pattyn21-May-09 10:15 
AnswerRe: how to ceate event_click for button with C# ? Pin
_Maxxx_21-May-09 17:35
professional_Maxxx_21-May-09 17:35 
Questionhow create a Function return as DataTable with C# ? Pin
xingselex21-May-09 8:22
xingselex21-May-09 8:22 
AnswerRe: how create a Function return as DataTable with C# ? Pin
0x3c021-May-09 8:26
0x3c021-May-09 8:26 
AnswerRe: how create a Function return as DataTable with C# ? Pin
MidwestLimey21-May-09 8:50
professionalMidwestLimey21-May-09 8:50 
AnswerRe: how create a Function return as DataTable with C# ? Pin
cod3newbie22-May-09 7:19
cod3newbie22-May-09 7:19 
QuestionAutomatic webbrowsing gives "object reference not set to an instance of an object" Pin
Member 441789221-May-09 8:17
Member 441789221-May-09 8:17 
AnswerRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
0x3c021-May-09 8:21
0x3c021-May-09 8:21 
AnswerRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
Luc Pattyn21-May-09 8:22
sitebuilderLuc Pattyn21-May-09 8:22 
AnswerRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
Member 441789221-May-09 8:26
Member 441789221-May-09 8:26 
GeneralRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
0x3c021-May-09 8:27
0x3c021-May-09 8:27 
GeneralRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
Member 441789221-May-09 8:31
Member 441789221-May-09 8:31 
GeneralRe: Automatic webbrowsing gives "object reference not set to an instance of an object" Pin
0x3c021-May-09 9:03
0x3c021-May-09 9:03 
QuestionProblem | Delegates, Events, Win App in c# Pin
dinbrca3521-May-09 7:33
dinbrca3521-May-09 7:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.