I have things like:
<form id="Form1"> ... </form>
How do I refer to this form in my C# codebehind? I tried simply using “Form1” but it gives me an error. And googling hasn’t helped either.
What I’m trying to achieve is to enter the item name or one of those fields dynamically on a google checkout “buy now” button. See: How to subscribe to click event of html form?.
You need to run the form server side:
However, if you are using ASP.NET Web Forms you can only have 1 form per web form running server side.
EDIT: After seeing your edit, I would recommend posting the values to a standalone value on your website using
Response.Redirect():Then on this standalone page have the following:
Then use javascript/jquery to automatically post this form onload:
This gets around the issue of only having 1 form per page.