I am using Umbraco v. 6.1.6 and webforms.
Trying to create a user control with form fields that could be submitted as an email to a recipient or posted to an SQL data base.
Here is my .ascx
<script src="/scripts/cookies.js"></script>
<div id=newUserForm">
<p>Name: <asp:TextBox ID="user" runat="server" OnTextChanged="user_TextChanged"></asp:TextBox></p>
<p>Year of High School Graduation: <asp:TextBox ID="year" runat="server" OnTextChanged="year_TextChanged"></asp:TextBox></p>
<asp:Button ID="Submit" runat="server" OnClientClick="Submit" Text="Submit" />
</div>
I don't know how to post the data from the textBoxes when "OnClientClick", there just isn't any documentation out there on the methods needed.
I guess I need help with the CodeBehind for the post.
Also, would like to only make the form visible after a cookie check. I've got the Javascript for the cookie check, but not sure how to implement it with the user control.
User Control to Post Form Data
I am using Umbraco v. 6.1.6 and webforms. Trying to create a user control with form fields that could be submitted as an email to a recipient or posted to an SQL data base. Here is my .ascx
I don't know how to post the data from the textBoxes when "OnClientClick", there just isn't any documentation out there on the methods needed. I guess I need help with the CodeBehind for the post.
Also, would like to only make the form visible after a cookie check. I've got the Javascript for the cookie check, but not sure how to implement it with the user control.
Hi Steve,
I was thinking if you could use a custom table and save data into this. If this could be a possible solution for you, try see this video from Aptitude
https://www.aptitude.co.uk/videos/using-custom-tables-data-in-umbraco/
/Dennis
We aren't using Mvc, so this is not an option. Thanks though.
is working on a reply...