Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I need to do this in .Net:

<form name="submission1" method="post" action="https://www.foo.com/cgi-bin/mas/buynow.cgi">
<input style="WIDTH: 30px" size="1" value="1" name="1-qty"> <input style="WIDTH: 130px" type="submit" value="Button Name">
<input type="hidden" value="Value Name" name="1-desc"> <INPUT type="hidden" value="1" name="showaddr">
<input type="hidden" value="100.00" name="1-cost"> <INPUT type="hidden" value="http://www.foofromyou.com/confirmation.aspx" name="ret_addr">
<INPUT type="hidden" value="Merchant" name="mername"> <INPUT type="hidden" name="mertext">
<INPUT type="hidden" name="email_text"> <INPUT type="hidden" value="1" name="visaimage">
<INPUT type="hidden" value="Account" name="vendor_id"> <INPUT type="hidden" value="http://www.foofromyou.net" name="home_page">
<INPUT type="hidden" value="1" name="mcimage"> <INPUT type="hidden" value="1" name="ameximage">
<INPUT type="hidden" value="1" name="discimage"> <INPUT type="hidden" name="dinerimage">
<INPUT type="hidden" value="1" name="acceptcards"> <INPUT type="hidden" value="1" name="altaddr">
</form>

 

So that I can change the values with my ASP.Net forms

 

Should I be combining this into a RegisterClientScriptBlock() command?

Edited by Derek Stone

Read the Fovean Chronicles

Because you just can't spend your whole day programming!

  • Moderators
Posted

You need to include "Runat=Server" in the form tag, and you can use OnSubmit to call a JavaScript/VBscript function.

 

You can use RegisterClientScriptBlock() if you're creating it at runtime or hard-code the client code, it's up to you.

Visit...Bassic Software
  • *Gurus*
Posted

You do not need the "runat" attribute in the form element to access the values of the various child input tags. Simply add "runat" and "id" attributes to each input tag and access them as if they were normal Web controls.

 

<input id="ctlFoobar" type="hidden" value="" runat="server" />

 

ctlFoobar.Value = "foobar"

Posted

Where ever you put the Runat=server at in the control, that portion doesn't post to the credit card server.

 

In the form, the whole thing doesn't redirect to the website location. In the input tags, which ever input has 'runat=server' doesn't transfer its data to the new location

Read the Fovean Chronicles

Because you just can't spend your whole day programming!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...