Click here to Skip to main content
15,887,214 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: help me in downloading attachment in email client Pin
Shuaib wasif khan24-Apr-07 1:43
Shuaib wasif khan24-Apr-07 1:43 
QuestionOn FireFox, unable to access javascript's object value.. Pin
Tk..23-Apr-07 22:49
Tk..23-Apr-07 22:49 
AnswerRe: On FireFox, unable to access javascript's object value.. Pin
Guffa24-Apr-07 9:15
Guffa24-Apr-07 9:15 
GeneralRe: On FireFox, unable to access javascript's object value.. Pin
Tk..24-Apr-07 19:52
Tk..24-Apr-07 19:52 
QuestionData type mismatch in criteria expression. Pin
dheema23-Apr-07 19:04
dheema23-Apr-07 19:04 
AnswerRe: Data type mismatch in criteria expression. Pin
Pete O'Hanlon23-Apr-07 22:49
mvePete O'Hanlon23-Apr-07 22:49 
QuestionHow to submit a POST with a WebRequest? (in C# to a PHP file) Pin
Super Lloyd23-Apr-07 15:35
Super Lloyd23-Apr-07 15:35 
AnswerRe: How to submit a POST with a WebRequest? (in C# to a PHP file) Pin
kubben24-Apr-07 2:16
kubben24-Apr-07 2:16 
You do need to set the content length. I see that you have commented out that line. You wouldn't be able to set the content length there anyway since you don't know the length of the reqStream Stream until after you have copied the incoming stream into it.

If you set the length and still have problems I think you would want to make sure your data stream coming in has data in it.

You also may need to set the content type. In my example below I am sending an xml file to a web page.

I would pass in a string instead and do something like this:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(p_returnUrl);
//Set the 'Method' property of the 'Webrequest' to 'POST'.
request.Method = "POST";
request.Accept = "text/xml";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] byte1 = encoding.GetBytes(data);

// Set the content type of the data being posted.
request.ContentType = "text/xml";

// Set the content length of the string being posted.
request.ContentLength = byte1.Length;

Stream newStream = request.GetRequestStream();

newStream.Write(byte1, 0, byte1.Length);

// Close the Stream object.
newStream.Close();



That code seems to work just fine for me.

Hope that helps.
Ben
Questioncan't create ASP.NET AJAX-Enabled Web Site in orcas Pin
Tsvi Girsh23-Apr-07 2:02
Tsvi Girsh23-Apr-07 2:02 
QuestionE-mail using javascript Pin
L Viljoen23-Apr-07 1:55
professionalL Viljoen23-Apr-07 1:55 
AnswerRe: E-mail using javascript Pin
badgrs23-Apr-07 2:19
badgrs23-Apr-07 2:19 
QuestionBUG IN PARAMETER OF ASP.NET 2.0 ? Pin
hifiger200423-Apr-07 1:52
hifiger200423-Apr-07 1:52 
AnswerRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
RichardGrimmer23-Apr-07 5:50
RichardGrimmer23-Apr-07 5:50 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? [modified] Pin
hifiger200423-Apr-07 6:48
hifiger200423-Apr-07 6:48 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
marky77723-Apr-07 23:24
marky77723-Apr-07 23:24 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
hifiger200423-Apr-07 23:29
hifiger200423-Apr-07 23:29 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
marky77723-Apr-07 23:37
marky77723-Apr-07 23:37 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
hifiger200424-Apr-07 2:04
hifiger200424-Apr-07 2:04 
QuestionDeveloping a new Site with FrontPage Pin
matjame22-Apr-07 23:03
matjame22-Apr-07 23:03 
AnswerRe: Developing a new Site with FrontPage Pin
Michael Hendrickx22-Apr-07 23:29
Michael Hendrickx22-Apr-07 23:29 
AnswerRe: Developing a new Site with FrontPage Pin
JimmyRopes27-Apr-07 19:10
professionalJimmyRopes27-Apr-07 19:10 
Questiondisplay data from database base on user input Pin
dheema22-Apr-07 22:58
dheema22-Apr-07 22:58 
QuestionReg web dialer Pin
NasimKaziS22-Apr-07 21:20
NasimKaziS22-Apr-07 21:20 
Questionjavascript to input masked date __/__/____ Pin
DineshSharmain22-Apr-07 20:49
DineshSharmain22-Apr-07 20:49 
AnswerRe: javascript to input masked date __/__/____ Pin
coolestCoder22-Apr-07 20:58
coolestCoder22-Apr-07 20:58 

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.