Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
AnswerRe: Visual Studio .Net ToolBox Pin
Vikram A Punathambekar31-Jan-06 19:39
Vikram A Punathambekar31-Jan-06 19:39 
GeneralRe: Visual Studio .Net ToolBox Pin
NormBohana1-Feb-06 8:01
NormBohana1-Feb-06 8:01 
GeneralRe: Visual Studio .Net ToolBox Pin
Vikram A Punathambekar1-Feb-06 16:31
Vikram A Punathambekar1-Feb-06 16:31 
GeneralRe: Visual Studio .Net ToolBox Pin
mav.northwind3-Feb-06 22:04
mav.northwind3-Feb-06 22:04 
QuestionDetermining Download Speed (HttpWebRequest, Stream, BeginRead) Pin
souren7731-Jan-06 15:21
souren7731-Jan-06 15:21 
Questionfont Pin
fmardani31-Jan-06 14:06
fmardani31-Jan-06 14:06 
AnswerRe: font Pin
Christian Graus31-Jan-06 14:27
protectorChristian Graus31-Jan-06 14:27 
QuestionNot All Code Paths Return A Value??? Pin
dbenisch31-Jan-06 13:49
dbenisch31-Jan-06 13:49 
I am trying to figure out how to post a memory buffer which is composed of an XML document, to a ASP page and I am getting a specific error that I am not sure why its throwing. The error is "not all code paths return a value." Below is the code, Is there someone here that can point out my mistake?

Many thanks in advance.

--Derk Confused | :confused:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

public class UTSPost
{
private const string BASE_URI = "http://Post/_Update.asp";

public string PostToWS(XmlDocument xmldoc)
{
string uriString = BASE_URI;

// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
string postData = xmldoc.ToString();

// Apply ASCII Encoding to obtain the string as a byte array.
byte[] postArray = Encoding.ASCII.GetBytes(postData);
System.Windows.Forms.MessageBox.Show("Uploading data ...");
myWebClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
myWebClient.UseDefaultCredentials = true;

//UploadData implicitly sets HTTP POST as the request method.
byte[] responseArray = myWebClient.UploadData(uriString, postArray);

// Decode and display the response.
//System.Windows.Forms.MessageBox.Show("Response received was :{0}", Encoding.ASCII.GetString(responseArray));
}
}

AnswerRe: Not All Code Paths Return A Value??? Pin
M@dHatter31-Jan-06 13:54
M@dHatter31-Jan-06 13:54 
GeneralRe: Not All Code Paths Return A Value??? Pin
dbenisch31-Jan-06 14:27
dbenisch31-Jan-06 14:27 
GeneralRe: Not All Code Paths Return A Value??? Pin
Christian Graus31-Jan-06 14:28
protectorChristian Graus31-Jan-06 14:28 
QuestionAccessing Access DataBase Pin
aPerfectCircle31-Jan-06 13:12
aPerfectCircle31-Jan-06 13:12 
AnswerRe: Accessing Access DataBase Pin
Kodanda Pani31-Jan-06 18:56
Kodanda Pani31-Jan-06 18:56 
AnswerRe: Accessing Access DataBase Pin
Navas.M31-Jan-06 20:24
Navas.M31-Jan-06 20:24 
Questionthread safe calls Pin
Manu_8131-Jan-06 12:57
Manu_8131-Jan-06 12:57 
AnswerRe: thread safe calls Pin
kasik31-Jan-06 13:07
kasik31-Jan-06 13:07 
AnswerRe: thread safe calls Pin
Shann31-Jan-06 23:32
Shann31-Jan-06 23:32 
QuestionError Icon on custom form Pin
theFrenchHornet31-Jan-06 12:13
theFrenchHornet31-Jan-06 12:13 
AnswerRe: Error Icon on custom form Pin
kasik31-Jan-06 12:51
kasik31-Jan-06 12:51 
GeneralRe: Error Icon on custom form Pin
theFrenchHornet31-Jan-06 16:23
theFrenchHornet31-Jan-06 16:23 
Questiontuff deployments projects. Pin
ranzask31-Jan-06 11:37
ranzask31-Jan-06 11:37 
QuestionSocket Help Pin
DocH0liday31-Jan-06 11:06
DocH0liday31-Jan-06 11:06 
QuestionHow can I Give the application referenced by a Process object Focus Pin
Dan Neely31-Jan-06 11:04
Dan Neely31-Jan-06 11:04 
Questiontimeout in second call webservice???? Pin
leonvanrooijen31-Jan-06 10:04
leonvanrooijen31-Jan-06 10:04 
Questionmy application with graphic Pin
Sasuko31-Jan-06 10:02
Sasuko31-Jan-06 10:02 

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.