Click here to Skip to main content
15,889,808 members
Home / Discussions / C#
   

C#

 
Questionproblem in deployment Pin
gtag10-Sep-09 22:10
gtag10-Sep-09 22:10 
AnswerRe: problem in deployment Pin
minnie mouse11-Sep-09 16:59
minnie mouse11-Sep-09 16:59 
QuestionHow to connect to a website and retrieve the page in C#? Pin
sheateng10-Sep-09 22:00
sheateng10-Sep-09 22:00 
AnswerRe: How to connect to a website and retrieve the page in C#? Pin
Md. Marufuzzaman10-Sep-09 22:17
professionalMd. Marufuzzaman10-Sep-09 22:17 
AnswerRe: How to connect to a website and retrieve the page in C#? Pin
vivasaayi11-Sep-09 0:53
vivasaayi11-Sep-09 0:53 
GeneralRe: How to connect to a website and retrieve the page in C#? Pin
sheateng27-Sep-09 21:43
sheateng27-Sep-09 21:43 
GeneralRe: How to connect to a website and retrieve the page in C#? Pin
vivasaayi28-Sep-09 3:52
vivasaayi28-Sep-09 3:52 
AnswerRe: How to connect to a website and retrieve the page in C#? [modified] Pin
April Fans21-Sep-09 17:09
April Fans21-Sep-09 17:09 
my english is pool. i don't know clearly.

for example:

public static string Post(string action, string parmString)
{
try
{
//Encode
Encoding myEncoding = Encoding.GetEncoding("GB2312");

//get URL
Uri myUri = new Uri(action);

//byte[]
byte[] paramBytes = myEncoding.GetBytes(parmString);

//new a webrequest
WebRequest myWebRequest = WebRequest .Create(myUri);

//set ContentType
myWebRequest.ContentType = "application/x-www-form-urlencoded";
//set Method
myWebRequest.Method = EnumWebMethod.POST.ToString();

//init request, get back stream
using (Stream requestStream = myWebRequest.GetRequestStream())
{
//send data
requestStream.Write(paramBytes, 0, paramBytes.Length);
}

//send request, get WebResponse object
WebResponse myWebResponse = myWebRequest.GetResponse();

//
using (StreamReader myStreamReader = new StreamReader(myWebResponse.GetResponseStream(), myEncoding))
{
return myStreamReader.ReadToEnd();
}
}
catch
{
return "request error!";
}
}

i hope i can help you.


modified on Wednesday, September 23, 2009 9:41 PM

April

Comm100 - Leading Live Chat Software Provider


modified 27-May-14 22:04pm.

QuestionExcel interop issue Pin
manustone10-Sep-09 21:33
manustone10-Sep-09 21:33 
QuestionCurrent directory problem in MDI container form Pin
mutpan10-Sep-09 20:58
mutpan10-Sep-09 20:58 
AnswerRe: Current directory problem in MDI container form Pin
Christian Graus10-Sep-09 21:03
protectorChristian Graus10-Sep-09 21:03 
GeneralRe: Current directory problem in MDI container form Pin
Lyon Sun11-Sep-09 1:55
Lyon Sun11-Sep-09 1:55 
AnswerRe: Current directory problem in MDI container form [modified] Pin
April Fans21-Sep-09 17:06
April Fans21-Sep-09 17:06 
Questionaccess font colour paterns in ToolStripCombo box Along with name Pin
santosh_anu10-Sep-09 20:52
santosh_anu10-Sep-09 20:52 
AnswerRe: access font colour paterns in ToolStripCombo box Along with name Pin
Henry Minute11-Sep-09 0:05
Henry Minute11-Sep-09 0:05 
GeneralRe: access font colour paterns in ToolStripCombo box Along with name Pin
santosh_anu11-Sep-09 7:09
santosh_anu11-Sep-09 7:09 
GeneralRe: access font colour paterns in ToolStripCombo box Along with name Pin
Henry Minute11-Sep-09 9:09
Henry Minute11-Sep-09 9:09 
AnswerRe: access font colour paterns in ToolStripCombo box Along with name Pin
April Fans21-Sep-09 17:15
April Fans21-Sep-09 17:15 
GeneralRe: access font colour paterns in ToolStripCombo box Along with name Pin
santosh_anu21-Sep-09 21:12
santosh_anu21-Sep-09 21:12 
QuestionHow to execute SSIS package from windows service Pin
Rajesh Koriya10-Sep-09 19:51
Rajesh Koriya10-Sep-09 19:51 
AnswerRe: How to execute SSIS package from windows service Pin
Kuthuparakkal21-Aug-12 17:44
Kuthuparakkal21-Aug-12 17:44 
QuestionAccessing bytes in a video as it is playing in windows media player Pin
FoxholeNorman10-Sep-09 17:28
FoxholeNorman10-Sep-09 17:28 
AnswerRe: Accessing bytes in a video as it is playing in windows media player Pin
Christian Graus10-Sep-09 17:52
protectorChristian Graus10-Sep-09 17:52 
GeneralRe: Accessing bytes in a video as it is playing in windows media player Pin
FoxholeNorman11-Sep-09 2:38
FoxholeNorman11-Sep-09 2:38 
QuestionLighten area of a image Pin
hardsoft10-Sep-09 11:35
hardsoft10-Sep-09 11:35 

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.