TheWizardofInt Posted January 25, 2004 Posted January 25, 2004 (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 January 25, 2004 by Derek Stone Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
Moderators Robby Posted January 25, 2004 Moderators Posted January 25, 2004 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. Quote Visit...Bassic Software
TheWizardofInt Posted January 25, 2004 Author Posted January 25, 2004 It doesn't execute with a Runat=Server in the form tag What I need to do is transmit the data so that I can change things at run time, so what I need to see is how to move the data to a javascript Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
*Gurus* Derek Stone Posted January 25, 2004 *Gurus* Posted January 25, 2004 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" Quote Posting Guidelines
TheWizardofInt Posted January 25, 2004 Author Posted January 25, 2004 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 Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
*Gurus* Derek Stone Posted January 25, 2004 *Gurus* Posted January 25, 2004 The "runat" attribute is NOT processed by browsers. The behavior you are describing is not due to these attributes. Quote Posting Guidelines
TheWizardofInt Posted January 25, 2004 Author Posted January 25, 2004 Strange - because it is easy to emulate the situation. I will play around with it some more Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.