I'm having massive issues with a simple form submit / enter data into database problem. I'm loading a custom .ascx with a dnn control loader module. The form fails to post back. When I click send the form is being reloaded and reset, all the fields are blanked. I'm not sure maybe my approach is wrong
Some samples from my code:
<%@ Control Language="vb" Inherits="DotNetNuke.Entities.Modules.PortalModuleBase" AutoEventWireup="false" Explicit="True" %>
Sub Page_Load (ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Page.IsPostBack = false then
ClickedText.Text = "PostBack is False"
End If
End Sub
Protected Sub btnInsertData_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnInsertData.Click
'ClickedText.Text = "CLICKED!"
SqlBooking.Insert()
End Sub ' InsertData
<asp:button runat="server" id="btnInsertData" text="Send" class="formularkontakt" onclick="btnInsertData_Click" />
I'm using a <asp:SqlDataSource's insert command and <insertparameters> <asp:controlparameter... to insert the Data, there's also an associated OnInserted Sub that triggers a mail send.