Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
QuestionDelegate Pin
onlybabla23-Oct-06 0:36
onlybabla23-Oct-06 0:36 
AnswerRe: Delegate Pin
Ed.Poore23-Oct-06 4:04
Ed.Poore23-Oct-06 4:04 
GeneralRe: Delegate Pin
onlybabla23-Oct-06 4:13
onlybabla23-Oct-06 4:13 
GeneralRe: Delegate Pin
Ed.Poore23-Oct-06 5:12
Ed.Poore23-Oct-06 5:12 
AnswerRe: Delegate Pin
ednrgc23-Oct-06 5:02
ednrgc23-Oct-06 5:02 
GeneralRe: Delegate Pin
onlybabla24-Oct-06 1:03
onlybabla24-Oct-06 1:03 
GeneralRe: Delegate Pin
ednrgc24-Oct-06 2:39
ednrgc24-Oct-06 2:39 
QuestionHttpRequest and Response in Windows Mobile Pin
Sri harini23-Oct-06 0:15
Sri harini23-Oct-06 0:15 
Hi
I am developing Windows Mobile Application using VS2005.
I am requesting File Details(XML output) from server, but the response is very slow.
FileDetails Consist of File info and its Chunks Info.
Can anybody suggests improvements in the below code to speedup the server response.

public static void httpRequest(string uri, bool isGetMethod)
{
try
{
// Prepare web request...

HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create(uri);

Console.WriteLine(uri);

// We use POST ( we can also use GET )
if (isGetMethod)
myRequest.Method = "GET";
else
{
myRequest.Method = "POST";

// Set the content type to a FORM

myRequest.ContentType = "application/x-www-form-urlencoded";
Stream newStream = myRequest.GetRequestStream();

newStream.Close();
}


// Assign the response object of 'HttpWebRequest' to a 'HttpWebResponse' variable.

HttpWebResponse myHttpWebResponse = (HttpWebResponse)myRequest.GetResponse();

// Display the contents of the page to the console.

Stream streamResponse = myHttpWebResponse.GetResponseStream();

// Get stream object

StreamReader streamRead = new StreamReader(streamResponse);

Char[] readBuffer = new Char[256];

// Read from buffer

int count = streamRead.Read(readBuffer, 0, 256);

while (count > 0)
{
//get string

string resultData = new String(readBuffer, 0, count);
HTTPClass.resultData = resultData;

// Write the data

Console.WriteLine(resultData);

// Read from buffer

count = streamRead.Read(readBuffer, 0, 256);
}
// Release the response object resources.
streamRead.Close();
streamResponse.Close();
//Close response
myHttpWebResponse.Close();
}
Questionhelp remote and right !! Pin
vincent3123-Oct-06 0:06
vincent3123-Oct-06 0:06 
AnswerRe: help remote and right !! Pin
LongRange.Shooter23-Oct-06 4:11
LongRange.Shooter23-Oct-06 4:11 
Questionsend SMS Pin
onlybabla22-Oct-06 23:50
onlybabla22-Oct-06 23:50 
AnswerRe: send SMS Pin
JacquesDP23-Oct-06 1:03
JacquesDP23-Oct-06 1:03 
GeneralRe: send SMS Pin
onlybabla23-Oct-06 1:13
onlybabla23-Oct-06 1:13 
AnswerRe: send SMS Pin
JacquesDP23-Oct-06 1:32
JacquesDP23-Oct-06 1:32 
QuestionSave the keystrokes Pin
CodeItWell22-Oct-06 23:12
CodeItWell22-Oct-06 23:12 
AnswerRe: Save the keystrokes Pin
Stefan Troschuetz22-Oct-06 23:48
Stefan Troschuetz22-Oct-06 23:48 
Questionhow to handle the click event in main menu? Pin
ASysSolvers22-Oct-06 21:13
ASysSolvers22-Oct-06 21:13 
AnswerRe: how to handle the click event in main menu? Pin
LongRange.Shooter23-Oct-06 4:15
LongRange.Shooter23-Oct-06 4:15 
QuestionPlease help: C# mini dump Pin
raskar22-Oct-06 21:10
raskar22-Oct-06 21:10 
AnswerRe: Please help: C# mini dump Pin
Ed.Poore23-Oct-06 4:05
Ed.Poore23-Oct-06 4:05 
AnswerRe: Please help: C# mini dump Pin
S. Senthil Kumar23-Oct-06 8:34
S. Senthil Kumar23-Oct-06 8:34 
Questionmessenger application Pin
dtraooo22-Oct-06 20:53
dtraooo22-Oct-06 20:53 
AnswerRe: messenger application Pin
Guffa22-Oct-06 22:37
Guffa22-Oct-06 22:37 
AnswerRe: messenger application Pin
V.23-Oct-06 1:08
professionalV.23-Oct-06 1:08 
AnswerRe: messenger application Pin
Niiiissssshhhhhuuuuu23-Oct-06 1:45
Niiiissssshhhhhuuuuu23-Oct-06 1:45 

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.