Click here to Skip to main content
15,887,596 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: jquery in asp.net+server side execution Pin
saini arun11-Jun-10 20:24
saini arun11-Jun-10 20:24 
GeneralRe: jquery in asp.net+server side execution Pin
trilokharry11-Jun-10 20:58
trilokharry11-Jun-10 20:58 
GeneralRe: jquery in asp.net+server side execution Pin
saini arun11-Jun-10 21:11
saini arun11-Jun-10 21:11 
QuestionCrystal Reports in a web application [modified] Pin
Harshini8111-Jun-10 14:59
Harshini8111-Jun-10 14:59 
QuestionASP.NET and smooth colour changing Pin
Unsy11-Jun-10 10:45
Unsy11-Jun-10 10:45 
AnswerRe: ASP.NET and smooth colour changing Pin
thatraja11-Jun-10 19:40
professionalthatraja11-Jun-10 19:40 
AnswerRe: ASP.NET and smooth colour changing Pin
Amar Chaudhary12-Jun-10 17:26
Amar Chaudhary12-Jun-10 17:26 
Questiontrying to submit an httpwebrequest with hidden field and submit button data Pin
Member 391904911-Jun-10 10:25
Member 391904911-Jun-10 10:25 
Hi - I'm implementing PayPal PDT (Payment Data Transfer) for payment confirmations in ASP.NET.

I'm going to receive a url post from PayPal with query string parameters. Then I need to send back the form at the bottom of the page.

I'd like to implement the form at the bottom as a non-visual HttpWebRequest. So far I have this code:

string urlPayPalEnvironment = "https://www.paypal.com/cgi-bin/webscr";

// Prepare web request.
HttpWebRequest request = WebRequest.Create(urlPayPalEnvironment) as HttpWebRequest;
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";

Can you help me extend this code to include the required hidden fields?

I've seen code on the web that builds a data string like this:

string postData =
"cmd=_notify-synch" +
"&tx=" + txId +
"&at=" + merchantIdentityToken;

Is this how HttpWebRequest works internally - hidden fields are simply converted into name-value pairs in a querystring?

Also - I'm not sure how the submit input would be added to this. It just has a value of "PDT" in the required form format below with no name. Any ideas on how to handle this?

Also - I've seen some examples where the HttpWebRequest just gets streamed out but I'd like an OO approach using the HttpWebResponse to get a handle to the response.

Thanks for your help!

<form method=post action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_notify-synch">
<input type="hidden" name="tx" value="TransactionID">
<input type="hidden" name="at" value="YourIdentityToken">
<input type="submit" value="PDT">
</form>
QuestionRestrict logged in user to login again Pin
Hemant Thaker11-Jun-10 7:58
Hemant Thaker11-Jun-10 7:58 
AnswerRe: Restrict logged in user to login again Pin
Adam R Harris11-Jun-10 8:10
Adam R Harris11-Jun-10 8:10 
QuestionRe: Restrict logged in user to login again Pin
Hemant Thaker11-Jun-10 8:24
Hemant Thaker11-Jun-10 8:24 
AnswerRe: Restrict logged in user to login again Pin
Adam R Harris11-Jun-10 8:43
Adam R Harris11-Jun-10 8:43 
QuestionRe: Restrict logged in user to login again Pin
Hemant Thaker11-Jun-10 8:55
Hemant Thaker11-Jun-10 8:55 
AnswerRe: Restrict logged in user to login again Pin
Adam R Harris11-Jun-10 9:11
Adam R Harris11-Jun-10 9:11 
QuestionDinamically created gridview not handling SelectedIndexChanged Pin
Zasumo11-Jun-10 7:27
Zasumo11-Jun-10 7:27 
AnswerRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Adam R Harris11-Jun-10 8:15
Adam R Harris11-Jun-10 8:15 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Zasumo14-Jun-10 3:01
Zasumo14-Jun-10 3:01 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Adam R Harris14-Jun-10 3:14
Adam R Harris14-Jun-10 3:14 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Zasumo14-Jun-10 3:58
Zasumo14-Jun-10 3:58 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Adam R Harris15-Jun-10 9:06
Adam R Harris15-Jun-10 9:06 
QuestionUsing Resource file in C# .NET Pin
VOITDOTNET11-Jun-10 7:10
VOITDOTNET11-Jun-10 7:10 
AnswerRe: Using Resource file in C# .NET Pin
Adam R Harris11-Jun-10 8:17
Adam R Harris11-Jun-10 8:17 
GeneralRe: Using Resource file in C# .NET Pin
VOITDOTNET11-Jun-10 9:53
VOITDOTNET11-Jun-10 9:53 
AnswerRe: Using Resource file in C# .NET Pin
Sandeep Mewara11-Jun-10 10:28
mveSandeep Mewara11-Jun-10 10:28 
QuestionSearch and Replace String Value Pin
AsianRogueOne11-Jun-10 4:01
AsianRogueOne11-Jun-10 4:01 

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.