Click here to Skip to main content
15,914,070 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: I Need Quick help Plz anybody... Pin
Christian Graus27-Jun-07 10:54
protectorChristian Graus27-Jun-07 10:54 
GeneralRe: I Need Quick help Plz anybody... Pin
Sathyaa1528-Jun-07 0:55
Sathyaa1528-Jun-07 0:55 
QuestionSending Mail Problem. Pin
deepaks327-Jun-07 8:38
deepaks327-Jun-07 8:38 
AnswerRe: Sending Mail Problem. Pin
Christian Graus27-Jun-07 10:55
protectorChristian Graus27-Jun-07 10:55 
GeneralRe: Sending Mail Problem. Pin
deepaks327-Jun-07 18:02
deepaks327-Jun-07 18:02 
QuestionHelp needed in performing validation Pin
gayathri_it200527-Jun-07 7:39
gayathri_it200527-Jun-07 7:39 
AnswerRe: Help needed in performing validation Pin
Not Active27-Jun-07 8:21
mentorNot Active27-Jun-07 8:21 
QuestionHttpWebRequest Pin
dekart_roo27-Jun-07 5:51
dekart_roo27-Jun-07 5:51 
I have a script that I can post to via a simple html form, but I can't figure out how to replicate the results with HttpWebRequest. Is there a way of getting the full functionality of a form submit via the HttpWebRequest?

Works:






Does not Work:
ASCIIEncoding encoder = new ASCIIEncoding();

string ifxLoc = "http://script-to-submit-to/login.dll?login";
string postData = "UserName=" + unme;
postData += "&PassWord=" + upswd;

byte[] data = encoder.GetBytes(postData);

HttpWebRequest s2oReq = (HttpWebRequest) WebRequest.Create(ifxLoc);
s2oReq.Method = "POST";
s2oReq.AllowAutoRedirect = true;
s2oReq.ContentType = "application/x-www-form-urlencoded";
s2oReq.ContentLength = data.Length;

Stream s2oStream = s2oReq.GetRequestStream();
s2oStream.Write(data, 0, data.Length);
s2oStream.Close();

Problem:
The HttpWebRequest seems to make a shallow connection to the login.dll, or doesn't fully follow through. I can't get it...working... in any way. It just returns the input of the html of the login page. Am I going about it in the wrong manner?

I also need a way to impliment the native redirect that's built into the simple form submit. If I use a response.redirect() after closing the stream, it is not the same.

Thanks!
-Roo
QuestionDelete row from GridView which is bound to DataTable [modified] Pin
kjosh27-Jun-07 5:15
kjosh27-Jun-07 5:15 
AnswerRe: Delete row from GridView which is bound to DataTable Pin
Urs Enzler27-Jun-07 8:34
Urs Enzler27-Jun-07 8:34 
QuestionValues in array Pin
afreshpulse27-Jun-07 4:45
afreshpulse27-Jun-07 4:45 
AnswerRe: Values in array Pin
RichardGrimmer27-Jun-07 5:45
RichardGrimmer27-Jun-07 5:45 
GeneralRe: Values in array Pin
afreshpulse27-Jun-07 6:24
afreshpulse27-Jun-07 6:24 
GeneralRe: Values in array Pin
Urs Enzler27-Jun-07 8:40
Urs Enzler27-Jun-07 8:40 
GeneralRe: Values in array Pin
RichardGrimmer27-Jun-07 9:38
RichardGrimmer27-Jun-07 9:38 
QuestionNo. of hites facility in my website Pin
pathak7827-Jun-07 4:42
pathak7827-Jun-07 4:42 
AnswerRe: No. of hites facility in my website Pin
Christian Graus27-Jun-07 11:00
protectorChristian Graus27-Jun-07 11:00 
AnswerRe: No. of hites facility in my website Pin
Vasudevan Deepak Kumar27-Jun-07 21:40
Vasudevan Deepak Kumar27-Jun-07 21:40 
QuestionProperty value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 4:41
ZeedijkMike27-Jun-07 4:41 
AnswerRe: Property value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 4:43
ZeedijkMike27-Jun-07 4:43 
AnswerRe: Property value after PostBack of UserControl Pin
SHatchard27-Jun-07 5:28
SHatchard27-Jun-07 5:28 
GeneralRe: Property value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 5:56
ZeedijkMike27-Jun-07 5:56 
AnswerRe: Property value after PostBack of UserControl Pin
Urs Enzler27-Jun-07 8:44
Urs Enzler27-Jun-07 8:44 
QuestionRetrieving Property value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 4:39
ZeedijkMike27-Jun-07 4:39 
AnswerRe: Retrieving Property value after PostBack of UserControl Pin
Venkatesh Mookkan27-Jun-07 17:38
Venkatesh Mookkan27-Jun-07 17:38 

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.