Hello,
I am replacing asp:TextBox with RadTextBox in the following form. If I delete "Convert Row Object Value To Input Control" error, the page seems to work, but when I look in the database for the textbox I changed, the value shows "NULL"
Please help me figure out what is wrong with my form. Note that the code below only has one RadDateInput which inoputs the NULL value, not the date into the database
as it should.
<%@ Page Language="VB" ValidateRequest="False" CodePage="65001" LCID="3081" MasterPageFile="masterpage.master" %> |
<%@ MasterType VirtualPath="masterpage.master" %> |
<%@ Register NameSpace="members" TagPrefix="members" %> |
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
<script runat="server"> |
Dim key As memberskey ' record key |
Dim oldrow As membersrow ' old record data input by user |
Dim newrow As membersrow ' new record data input by user |
Dim objProfile As TableProfile ' table profile |
' ************************* |
' * Handler for Page Init |
' ************************* |
Protected Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) |
objProfile = CustomProfile.GetTable(Share.ProjectName, membersinf.TableVar) |
End Sub |
' ************************* |
' * Handler for Page Load |
' ************************* |
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) |
Response.Cache.SetCacheability(HttpCacheability.NoCache) |
Page.ClientScript.RegisterClientScriptInclude("ewv", "ewv.js") |
Dim jsString As String = String.Empty |
Page.ClientScript.RegisterClientScriptInclude("ew_MultiPage", "ewmultipage.js") |
' generate the JS for multiple page (Start) |
' add the control id and page no to the array |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Email").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Password").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("xc_Password").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_FirstName").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_LastName").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_StreetNum").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_StreetName").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Suburb").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_City").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_State").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Telephone").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Gender").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_DOB").ClientID, "', 1);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Education").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_MaritalStatus").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Born").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Employment").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Occupation").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Industry").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_OrgSize").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Income").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_HouseSize").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_HouseKids").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_DecisionMkr").ClientID, "', 2);") |
jsString &= String.Concat("ew_MultiPageAddElement('", membersDetailsView.FindControl("x_Consent").ClientID, "', 2);") |
Page.ClientScript.RegisterClientScriptBlock(System.Type.GetType("System.String"), "ew_MultiPageAddElement", jsString, True) |
Page.Form.DefaultFocus = membersDetailsView.FindControl("x_Email").ClientID |
jsString = String.Empty |
jsString &= String.Concat("ew.Controls['x_Email'] = '", membersDetailsView.FindControl("x_Email").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Password'] = '", membersDetailsView.FindControl("x_Password").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_FirstName'] = '", membersDetailsView.FindControl("x_FirstName").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_LastName'] = '", membersDetailsView.FindControl("x_LastName").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_StreetNum'] = '", membersDetailsView.FindControl("x_StreetNum").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_StreetName'] = '", membersDetailsView.FindControl("x_StreetName").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Suburb'] = '", membersDetailsView.FindControl("x_Suburb").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_City'] = '", membersDetailsView.FindControl("x_City").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_State'] = '", membersDetailsView.FindControl("x_State").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Telephone'] = '", membersDetailsView.FindControl("x_Telephone").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Gender'] = '", membersDetailsView.FindControl("x_Gender").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_DOB'] = '", membersDetailsView.FindControl("x_DOB").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Education'] = '", membersDetailsView.FindControl("x_Education").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_MaritalStatus'] = '", membersDetailsView.FindControl("x_MaritalStatus").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Born'] = '", membersDetailsView.FindControl("x_Born").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Employment'] = '", membersDetailsView.FindControl("x_Employment").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Occupation'] = '", membersDetailsView.FindControl("x_Occupation").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Industry'] = '", membersDetailsView.FindControl("x_Industry").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_OrgSize'] = '", membersDetailsView.FindControl("x_OrgSize").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Income'] = '", membersDetailsView.FindControl("x_Income").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_HouseSize'] = '", membersDetailsView.FindControl("x_HouseSize").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_HouseKids'] = '", membersDetailsView.FindControl("x_HouseKids").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_DecisionMkr'] = '", membersDetailsView.FindControl("x_DecisionMkr").ClientID, "';") |
jsString &= String.Concat("ew.Controls['x_Consent'] = '", membersDetailsView.FindControl("x_Consent").ClientID, "';") |
Page.ClientScript.RegisterClientScriptBlock(System.Type.GetType("System.String"), "CtrlID", jsString, True) |
End Sub |
' ************* |
' * Load Data |
' ************* |
Private Sub LoadData() |
If (membersDetailsView.CurrentMode = DetailsViewMode.Insert) Then |
Dim source As DetailsView = membersDetailsView |
Dim row As membersrow = New membersrow() |
RowToControl(row, source, CtrlType.Edit) |
row = Nothing |
End If |
End Sub |
' ***************************************** |
' * Handler for DetailsView ItemInserting |
' ***************************************** |
Protected Sub membersDetailsView_ItemInserting(ByVal sender As Object, ByVal e As DetailsViewInsertEventArgs) |
Dim messageList As ArrayList = ValidateInputValues(TryCast(sender, Control), PageType.Register) |
If (messageList IsNot Nothing) Then |
lblMessage.Text = String.Empty |
For Each sMsg As String In messageList |
lblMessage.Text = lblMessage.Text + sMsg + "<br>" |
Next |
pnlMessage.Visible = True |
Dim source As WebControl = CType(sender,WebControl) |
If (source Is Nothing) Then |
Return |
End If |
oldrow = New membersrow() |
ControlToRow(oldrow, source) |
e.Cancel = True |
Return |
End If |
messageList = CheckDuplicateKey(TryCast(sender,WebControl)) |
If (messageList IsNot Nothing) Then |
lblMessage.Text = String.Empty |
For Each sMsg As String In messageList |
lblMessage.Text = lblMessage.Text + sMsg + "<br>" |
Next |
pnlMessage.Visible = True |
Dim source As WebControl = CType(sender,WebControl) |
If (source Is Nothing) Then |
Return |
End If |
oldrow = New membersrow() |
ControlToRow(oldrow, source) |
e.Cancel = True |
Return |
End If |
End Sub |
' **************************************** |
' * Handler for DetailsView ItemInserted |
' **************************************** |
Protected Sub membersDetailsView_ItemInserted(ByVal sender As Object, ByVal e As DetailsViewInsertedEventArgs) |
If (e.AffectedRows = 0) Then |
' Keep in insert mode |
e.KeepInInsertMode = True |
' Get original values |
' Restore at data binding |
Dim source As WebControl = TryCast(sender, WebControl) |
If (source Is Nothing) Then Return |
oldrow = New membersrow() |
ControlToRow(oldrow, source) |
Else |
Dim sUserID As String = string.Empty |
sUserID = newrow.Email |
Dim sReceiverEmail As String = newrow.Email |
If (Not String.IsNullOrEmpty(sReceiverEmail)) Then |
Dim sr As StreamReader = New StreamReader(Server.MapPath("register.txt")) |
Dim sBody As String = sr.ReadToEnd() |
sr.Close() |
Dim email As EW.Data.Email = New EW.Data.Email() |
email.LoadEmail(sBody) |
Dim sFrom As String = "admin@aussiethink.com.au" |
Dim sTo As String = sReceiverEmail |
Dim sCc As String = email.Cc |
Dim sBcc As String = email.Bcc |
Dim sSubject As String = email.Subject |
Dim sMail As String = email.EmailContent |
sMail = ReplaceEmailContentTags(sMail, sUserID) |
Dim sFormat As String = email.Format |
Dim sServer As String = "mail.aussiethink.com.au" |
Dim iPort As Integer = 25 |
email.SendEmail(sFrom, sTo, sCc, sBcc, sSubject, sMail, sFormat, sServer, iPort) |
End If |
CustomProfile.GetGlobal(Share.ProjectName).Message = "Registration Successful" |
Response.Redirect("login.aspx") |
End If |
End Sub |
' ********************************* |
' * Replace tags in email content |
' ********************************* |
Private Function ReplaceEmailContentTags(ByVal mailBody As String, ByVal sUserID As String) As String |
mailBody = mailBody.Replace("<% Email %>", sUserID) |
mailBody = mailBody.Replace("<% Password %>", Convert.ToString(newrow.Password)) |
mailBody = mailBody.Replace("<% FirstName %>", Convert.ToString(newrow.FirstName)) |
mailBody = mailBody.Replace("<% LastName %>", Convert.ToString(newrow.LastName)) |
mailBody = mailBody.Replace("<% StreetNum %>", Convert.ToString(newrow.StreetNum)) |
mailBody = mailBody.Replace("<% StreetName %>", Convert.ToString(newrow.StreetName)) |
mailBody = mailBody.Replace("<% Suburb %>", Convert.ToString(newrow.Suburb)) |
mailBody = mailBody.Replace("<% City %>", Convert.ToString(newrow.City)) |
mailBody = mailBody.Replace("<% State %>", Convert.ToString(newrow.State)) |
mailBody = mailBody.Replace("<% Telephone %>", Convert.ToString(newrow.Telephone)) |
mailBody = mailBody.Replace("<% Gender %>", Convert.ToString(newrow.Gender)) |
mailBody = mailBody.Replace("<% DOB %>", Convert.ToString(newrow.DOB)) |
mailBody = mailBody.Replace("<% Education %>", Convert.ToString(newrow.Education)) |
mailBody = mailBody.Replace("<% MaritalStatus %>", Convert.ToString(newrow.MaritalStatus)) |
mailBody = mailBody.Replace("<% Born %>", Convert.ToString(newrow.Born)) |
mailBody = mailBody.Replace("<% Employment %>", Convert.ToString(newrow.Employment)) |
mailBody = mailBody.Replace("<% Occupation %>", Convert.ToString(newrow.Occupation)) |
mailBody = mailBody.Replace("<% Industry %>", Convert.ToString(newrow.Industry)) |
mailBody = mailBody.Replace("<% OrgSize %>", Convert.ToString(newrow.OrgSize)) |
mailBody = mailBody.Replace("<% Income %>", Convert.ToString(newrow.Income)) |
mailBody = mailBody.Replace("<% HouseSize %>", Convert.ToString(newrow.HouseSize)) |
mailBody = mailBody.Replace("<% HouseKids %>", Convert.ToString(newrow.HouseKids)) |
mailBody = mailBody.Replace("<% DecisionMkr %>", Convert.ToString(newrow.DecisionMkr)) |
mailBody = mailBody.Replace("<% Consent %>", Convert.ToString(newrow.Consent)) |
Return mailBody |
End Function |
' ************************************* |
' * Handler for DetailsView DataBound |
' ************************************* |
Protected Sub membersDetailsView_DataBound(ByVal sender As Object, ByVal e As EventArgs) |
If (membersDetailsView.CurrentMode = DetailsViewMode.Insert) Then |
LoadData() |
End If |
End Sub |
' ******************************** |
' * Register ClientID of Controls |
' ******************************** |
Private Sub RegisterClientID(ByVal sBlockName As String, ByVal control As Control) |
Dim jsString As String = String.Empty |
If (control.FindControl("x_Email") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Email'] = '" & control.FindControl("x_Email").ClientID & "';" |
End If |
If (control.FindControl("x_Password") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Password'] = '" & control.FindControl("x_Password").ClientID & "';" |
End If |
If (control.FindControl("x_FirstName") IsNot Nothing) Then |
jsString &= "ew.Controls['x_FirstName'] = '" & control.FindControl("x_FirstName").ClientID & "';" |
End If |
If (control.FindControl("x_LastName") IsNot Nothing) Then |
jsString &= "ew.Controls['x_LastName'] = '" & control.FindControl("x_LastName").ClientID & "';" |
End If |
If (control.FindControl("x_StreetNum") IsNot Nothing) Then |
jsString &= "ew.Controls['x_StreetNum'] = '" & control.FindControl("x_StreetNum").ClientID & "';" |
End If |
If (control.FindControl("x_StreetName") IsNot Nothing) Then |
jsString &= "ew.Controls['x_StreetName'] = '" & control.FindControl("x_StreetName").ClientID & "';" |
End If |
If (control.FindControl("x_Suburb") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Suburb'] = '" & control.FindControl("x_Suburb").ClientID & "';" |
End If |
If (control.FindControl("x_City") IsNot Nothing) Then |
jsString &= "ew.Controls['x_City'] = '" & control.FindControl("x_City").ClientID & "';" |
End If |
If (control.FindControl("x_State") IsNot Nothing) Then |
jsString &= "ew.Controls['x_State'] = '" & control.FindControl("x_State").ClientID & "';" |
End If |
If (control.FindControl("x_Telephone") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Telephone'] = '" & control.FindControl("x_Telephone").ClientID & "';" |
End If |
If (control.FindControl("x_Gender") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Gender'] = '" & control.FindControl("x_Gender").ClientID & "';" |
End If |
If (control.FindControl("x_DOB") IsNot Nothing) Then |
jsString &= "ew.Controls['x_DOB'] = '" & control.FindControl("x_DOB").ClientID & "';" |
End If |
If (control.FindControl("x_Education") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Education'] = '" & control.FindControl("x_Education").ClientID & "';" |
End If |
If (control.FindControl("x_MaritalStatus") IsNot Nothing) Then |
jsString &= "ew.Controls['x_MaritalStatus'] = '" & control.FindControl("x_MaritalStatus").ClientID & "';" |
End If |
If (control.FindControl("x_Born") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Born'] = '" & control.FindControl("x_Born").ClientID & "';" |
End If |
If (control.FindControl("x_Employment") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Employment'] = '" & control.FindControl("x_Employment").ClientID & "';" |
End If |
If (control.FindControl("x_Occupation") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Occupation'] = '" & control.FindControl("x_Occupation").ClientID & "';" |
End If |
If (control.FindControl("x_Industry") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Industry'] = '" & control.FindControl("x_Industry").ClientID & "';" |
End If |
If (control.FindControl("x_OrgSize") IsNot Nothing) Then |
jsString &= "ew.Controls['x_OrgSize'] = '" & control.FindControl("x_OrgSize").ClientID & "';" |
End If |
If (control.FindControl("x_Income") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Income'] = '" & control.FindControl("x_Income").ClientID & "';" |
End If |
If (control.FindControl("x_HouseSize") IsNot Nothing) Then |
jsString &= "ew.Controls['x_HouseSize'] = '" & control.FindControl("x_HouseSize").ClientID & "';" |
End If |
If (control.FindControl("x_HouseKids") IsNot Nothing) Then |
jsString &= "ew.Controls['x_HouseKids'] = '" & control.FindControl("x_HouseKids").ClientID & "';" |
End If |
If (control.FindControl("x_DecisionMkr") IsNot Nothing) Then |
jsString &= "ew.Controls['x_DecisionMkr'] = '" & control.FindControl("x_DecisionMkr").ClientID & "';" |
End If |
If (control.FindControl("x_Consent") IsNot Nothing) Then |
jsString &= "ew.Controls['x_Consent'] = '" & control.FindControl("x_Consent").ClientID & "';" |
End If |
Page.ClientScript.RegisterClientScriptBlock(System.Type.GetType("System.String"), sBlockName, jsString, True) |
End Sub |
' ***************************************************** |
' * Processing Input Values Before Updating/Inserting |
' ***************************************************** |
Private Function ValidateInputValues(ByVal control As Control, ByVal pageType As PageType) As ArrayList |
Dim messageList As ArrayList = New ArrayList() |
DataFormat.SetDateSeparator("/") |
If (pageType <> PageType.Search) Then ' Add/Edit Validation |
Dim x_Email As TextBox = TryCast(control.FindControl("x_Email"), TextBox) |
If (x_Email IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Email.Text)) Then |
messageList.Add("Invalid Value (String): Email") |
ElseIf (String.IsNullOrEmpty(x_Email.Text)) Then |
messageList.Add("Please enter required field (String): Email") |
End If |
End If |
Dim x_Password As TextBox = TryCast(control.FindControl("x_Password"), TextBox) |
If (x_Password IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Password.Text)) Then |
messageList.Add("Invalid Value (String): Password") |
ElseIf (String.IsNullOrEmpty(x_Password.Text)) Then |
messageList.Add("Please enter required field (String): Password") |
End If |
End If |
Dim x_FirstName As TextBox = TryCast(control.FindControl("x_FirstName"), TextBox) |
If (x_FirstName IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_FirstName.Text)) Then |
messageList.Add("Invalid Value (String): First Name") |
ElseIf (String.IsNullOrEmpty(x_FirstName.Text)) Then |
messageList.Add("Please enter required field (String): First Name") |
End If |
End If |
Dim x_LastName As TextBox = TryCast(control.FindControl("x_LastName"), TextBox) |
If (x_LastName IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_LastName.Text)) Then |
messageList.Add("Invalid Value (String): Last Name") |
ElseIf (String.IsNullOrEmpty(x_LastName.Text)) Then |
messageList.Add("Please enter required field (String): Last Name") |
End If |
End If |
Dim x_StreetNum As TextBox = TryCast(control.FindControl("x_StreetNum"), TextBox) |
If (x_StreetNum IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_StreetNum.Text)) Then |
messageList.Add("Invalid Value (String): Street Num") |
ElseIf (String.IsNullOrEmpty(x_StreetNum.Text)) Then |
messageList.Add("Please enter required field (String): Street Num") |
End If |
End If |
Dim x_StreetName As TextBox = TryCast(control.FindControl("x_StreetName"), TextBox) |
If (x_StreetName IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_StreetName.Text)) Then |
messageList.Add("Invalid Value (String): Street Name") |
ElseIf (String.IsNullOrEmpty(x_StreetName.Text)) Then |
messageList.Add("Please enter required field (String): Street Name") |
End If |
End If |
Dim x_Suburb As TextBox = TryCast(control.FindControl("x_Suburb"), TextBox) |
If (x_Suburb IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Suburb.Text)) Then |
messageList.Add("Invalid Value (String): Suburb") |
End If |
End If |
Dim x_City As TextBox = TryCast(control.FindControl("x_City"), TextBox) |
If (x_City IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_City.Text)) Then |
messageList.Add("Invalid Value (String): City") |
ElseIf (String.IsNullOrEmpty(x_City.Text)) Then |
messageList.Add("Please enter required field (String): City") |
End If |
End If |
Dim x_State As DropDownList = TryCast(control.FindControl("x_State"), DropDownList) |
If (x_State IsNot Nothing) Then |
If ((x_State.SelectedIndex <= 0) AndAlso (Not DataFormat.CheckString(x_State.SelectedValue))) Then |
messageList.Add("Invalid Value (String): State") |
ElseIf (String.IsNullOrEmpty(x_State.SelectedValue)) Then |
messageList.Add("Please enter required field (String): State") |
End If |
End If |
Dim x_Telephone As TextBox = TryCast(control.FindControl("x_Telephone"), TextBox) |
If (x_Telephone IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Telephone.Text)) Then |
messageList.Add("Invalid Value (String): Telephone") |
ElseIf (String.IsNullOrEmpty(x_Telephone.Text)) Then |
messageList.Add("Please enter required field (String): Telephone") |
End If |
End If |
Dim x_Gender As RadioButtonList = TryCast(control.FindControl("x_Gender"), RadioButtonList) |
If (x_Gender IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Gender.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Gender") |
ElseIf (String.IsNullOrEmpty(x_Gender.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Gender") |
End If |
End If |
Dim x_Education As DropDownList = TryCast(control.FindControl("x_Education"), DropDownList) |
If (x_Education IsNot Nothing) Then |
If ((x_Education.SelectedIndex <= 0) AndAlso (Not DataFormat.CheckString(x_Education.SelectedValue))) Then |
messageList.Add("Invalid Value (String): Education") |
ElseIf (String.IsNullOrEmpty(x_Education.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Education") |
End If |
End If |
Dim x_MaritalStatus As DropDownList = TryCast(control.FindControl("x_MaritalStatus"), DropDownList) |
If (x_MaritalStatus IsNot Nothing) Then |
If ((x_MaritalStatus.SelectedIndex <= 0) AndAlso (Not DataFormat.CheckString(x_MaritalStatus.SelectedValue))) Then |
messageList.Add("Invalid Value (String): Marital Status") |
ElseIf (String.IsNullOrEmpty(x_MaritalStatus.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Marital Status") |
End If |
End If |
Dim x_Born As RadioButtonList = TryCast(control.FindControl("x_Born"), RadioButtonList) |
If (x_Born IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Born.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Born") |
ElseIf (String.IsNullOrEmpty(x_Born.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Born") |
End If |
End If |
Dim x_Employment As DropDownList = TryCast(control.FindControl("x_Employment"), DropDownList) |
If (x_Employment IsNot Nothing) Then |
If ((x_Employment.SelectedIndex <= 0) AndAlso (Not DataFormat.CheckString(x_Employment.SelectedValue))) Then |
messageList.Add("Invalid Value (String): Employment") |
ElseIf (String.IsNullOrEmpty(x_Employment.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Employment") |
End If |
End If |
Dim x_Occupation As RadioButtonList = TryCast(control.FindControl("x_Occupation"), RadioButtonList) |
If (x_Occupation IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Occupation.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Occupation") |
ElseIf (String.IsNullOrEmpty(x_Occupation.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Occupation") |
End If |
End If |
Dim x_Industry As RadioButtonList = TryCast(control.FindControl("x_Industry"), RadioButtonList) |
If (x_Industry IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Industry.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Industry") |
ElseIf (String.IsNullOrEmpty(x_Industry.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Industry") |
End If |
End If |
Dim x_OrgSize As RadioButtonList = TryCast(control.FindControl("x_OrgSize"), RadioButtonList) |
If (x_OrgSize IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_OrgSize.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Org Size") |
ElseIf (String.IsNullOrEmpty(x_OrgSize.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Org Size") |
End If |
End If |
Dim x_Income As RadioButtonList = TryCast(control.FindControl("x_Income"), RadioButtonList) |
If (x_Income IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Income.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Income") |
ElseIf (String.IsNullOrEmpty(x_Income.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Income") |
End If |
End If |
Dim x_HouseSize As DropDownList = TryCast(control.FindControl("x_HouseSize"), DropDownList) |
If (x_HouseSize IsNot Nothing) Then |
If ((x_HouseSize.SelectedIndex <= 0) AndAlso (Not DataFormat.CheckString(x_HouseSize.SelectedValue))) Then |
messageList.Add("Invalid Value (String): House Size") |
ElseIf (String.IsNullOrEmpty(x_HouseSize.SelectedValue)) Then |
messageList.Add("Please enter required field (String): House Size") |
End If |
End If |
Dim x_HouseKids As DropDownList = TryCast(control.FindControl("x_HouseKids"), DropDownList) |
If (x_HouseKids IsNot Nothing) Then |
If ((x_HouseKids.SelectedIndex <= 0) AndAlso (Not DataFormat.CheckString(x_HouseKids.SelectedValue))) Then |
messageList.Add("Invalid Value (String): House Kids") |
ElseIf (String.IsNullOrEmpty(x_HouseKids.SelectedValue)) Then |
messageList.Add("Please enter required field (String): House Kids") |
End If |
End If |
Dim x_DecisionMkr As RadioButtonList = TryCast(control.FindControl("x_DecisionMkr"), RadioButtonList) |
If (x_DecisionMkr IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_DecisionMkr.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Decision Mkr") |
ElseIf (String.IsNullOrEmpty(x_DecisionMkr.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Decision Mkr") |
End If |
End If |
Dim x_Consent As CheckBoxList = TryCast(control.FindControl("x_Consent"), CheckBoxList) |
If (x_Consent IsNot Nothing) Then |
If (Not DataFormat.CheckString(x_Consent.SelectedValue)) Then |
messageList.Add("Invalid Value (String): Consent") |
ElseIf (String.IsNullOrEmpty(x_Consent.SelectedValue)) Then |
messageList.Add("Please enter required field (String): Consent") |
End If |
End If |
Dim data As membersdal = New membersdal() |
Dim rows As membersrows |
Dim strWhere As String = String.Empty |
x_Email = TryCast(control.FindControl("x_Email"), TextBox) |
strWhere = "([Email] = '" + (x_Email.Text) + "')" |
rows = data.LoadList(strWhere) |
If (rows IsNot Nothing AndAlso rows.Count > 0) Then |
messageList.Add("Duplicate value: Email") |
End If |
End If |
Return IIf(messageList.Count = 0, Nothing, messageList) |
End Function |
' ********************************************** |
' * Convert Input Control Values to Row Object |
' ********************************************** |
Private Sub ControlToRow(ByVal row As membersrow, ByVal control As WebControl) |
If (row Is Nothing) Then Return' empty row object |
If (control Is Nothing) Then Return' empty control object |
row.SetPageType(PageType.Register) ' set page type = list for update |
' Field Email |
Dim x_Email As TextBox = TryCast(control.FindControl("x_Email"), TextBox) |
If (x_Email.Text <> String.Empty) Then row.Email = x_Email.Text Else row.Email = String.Empty |
' Field Password |
Dim x_Password As TextBox = TryCast(control.FindControl("x_Password"), TextBox) |
If (x_Password.Text <> String.Empty) Then row.Password = x_Password.Text Else row.Password = String.Empty |
' Field FirstName |
Dim x_FirstName As TextBox = TryCast(control.FindControl("x_FirstName"), TextBox) |
If (x_FirstName.Text <> String.Empty) Then row.FirstName = x_FirstName.Text Else row.FirstName = String.Empty |
' Field LastName |
Dim x_LastName As TextBox = TryCast(control.FindControl("x_LastName"), TextBox) |
If (x_LastName.Text <> String.Empty) Then row.LastName = x_LastName.Text Else row.LastName = String.Empty |
' Field StreetNum |
Dim x_StreetNum As TextBox = TryCast(control.FindControl("x_StreetNum"), TextBox) |
If (x_StreetNum.Text <> String.Empty) Then row.StreetNum = x_StreetNum.Text Else row.StreetNum = String.Empty |
' Field StreetName |
Dim x_StreetName As TextBox = TryCast(control.FindControl("x_StreetName"), TextBox) |
If (x_StreetName.Text <> String.Empty) Then row.StreetName = x_StreetName.Text Else row.StreetName = String.Empty |
' Field Suburb |
Dim x_Suburb As TextBox = TryCast(control.FindControl("x_Suburb"), TextBox) |
If (x_Suburb.Text <> String.Empty) Then row.Suburb = x_Suburb.Text Else row.Suburb = Nothing |
' Field City |
Dim x_City As TextBox = TryCast(control.FindControl("x_City"), TextBox) |
If (x_City.Text <> String.Empty) Then row.City = x_City.Text Else row.City = String.Empty |
' Field State |
Dim x_State As DropDownList = TryCast(control.FindControl("x_State"), DropDownList) |
Dim v_State As String = String.Empty |
For Each li As LIstItem In x_State.Items |
If (li.Selected) Then |
v_State += li.Value |
Exit For |
End If |
Next |
If (v_State <> String.Empty) Then |
row.State = v_State |
Else |
row.State = String.Empty |
End If |
' Field Telephone |
Dim x_Telephone As TextBox = TryCast(control.FindControl("x_Telephone"), TextBox) |
If (x_Telephone.Text <> String.Empty) Then row.Telephone = x_Telephone.Text Else row.Telephone = String.Empty |
' Field Gender |
Dim x_Gender As RadioButtonList = TryCast(control.FindControl("x_Gender"), RadioButtonList) |
Dim v_Gender As String = String.Empty |
For Each li As LIstItem In x_Gender.Items |
If (li.Selected) Then |
v_Gender += li.Value |
Exit For |
End If |
Next |
If (v_Gender <> String.Empty) Then |
row.Gender = v_Gender |
Else |
row.Gender = String.Empty |
End If |
' Field Education |
Dim x_Education As DropDownList = TryCast(control.FindControl("x_Education"), DropDownList) |
Dim v_Education As String = String.Empty |
For Each li As LIstItem In x_Education.Items |
If (li.Selected) Then |
v_Education += li.Value |
Exit For |
End If |
Next |
If (v_Education <> String.Empty) Then |
row.Education = v_Education |
Else |
row.Education = String.Empty |
End If |
' Field MaritalStatus |
Dim x_MaritalStatus As DropDownList = TryCast(control.FindControl("x_MaritalStatus"), DropDownList) |
Dim v_MaritalStatus As String = String.Empty |
For Each li As LIstItem In x_MaritalStatus.Items |
If (li.Selected) Then |
v_MaritalStatus += li.Value |
Exit For |
End If |
Next |
If (v_MaritalStatus <> String.Empty) Then |
row.MaritalStatus = v_MaritalStatus |
Else |
row.MaritalStatus = String.Empty |
End If |
' Field Born |
Dim x_Born As RadioButtonList = TryCast(control.FindControl("x_Born"), RadioButtonList) |
Dim v_Born As String = String.Empty |
For Each li As LIstItem In x_Born.Items |
If (li.Selected) Then |
v_Born += li.Value |
Exit For |
End If |
Next |
If (v_Born <> String.Empty) Then |
row.Born = v_Born |
Else |
row.Born = String.Empty |
End If |
' Field Employment |
Dim x_Employment As DropDownList = TryCast(control.FindControl("x_Employment"), DropDownList) |
Dim v_Employment As String = String.Empty |
For Each li As LIstItem In x_Employment.Items |
If (li.Selected) Then |
v_Employment += li.Value |
Exit For |
End If |
Next |
If (v_Employment <> String.Empty) Then |
row.Employment = v_Employment |
Else |
row.Employment = String.Empty |
End If |
' Field Occupation |
Dim x_Occupation As RadioButtonList = TryCast(control.FindControl("x_Occupation"), RadioButtonList) |
Dim v_Occupation As String = String.Empty |
For Each li As LIstItem In x_Occupation.Items |
If (li.Selected) Then |
v_Occupation += li.Value |
Exit For |
End If |
Next |
If (v_Occupation <> String.Empty) Then |
row.Occupation = v_Occupation |
Else |
row.Occupation = String.Empty |
End If |
' Field Industry |
Dim x_Industry As RadioButtonList = TryCast(control.FindControl("x_Industry"), RadioButtonList) |
Dim v_Industry As String = String.Empty |
For Each li As LIstItem In x_Industry.Items |
If (li.Selected) Then |
v_Industry += li.Value |
Exit For |
End If |
Next |
If (v_Industry <> String.Empty) Then |
row.Industry = v_Industry |
Else |
row.Industry = String.Empty |
End If |
' Field OrgSize |
Dim x_OrgSize As RadioButtonList = TryCast(control.FindControl("x_OrgSize"), RadioButtonList) |
Dim v_OrgSize As String = String.Empty |
For Each li As LIstItem In x_OrgSize.Items |
If (li.Selected) Then |
v_OrgSize += li.Value |
Exit For |
End If |
Next |
If (v_OrgSize <> String.Empty) Then |
row.OrgSize = v_OrgSize |
Else |
row.OrgSize = String.Empty |
End If |
' Field Income |
Dim x_Income As RadioButtonList = TryCast(control.FindControl("x_Income"), RadioButtonList) |
Dim v_Income As String = String.Empty |
For Each li As LIstItem In x_Income.Items |
If (li.Selected) Then |
v_Income += li.Value |
Exit For |
End If |
Next |
If (v_Income <> String.Empty) Then |
row.Income = v_Income |
Else |
row.Income = String.Empty |
End If |
' Field HouseSize |
Dim x_HouseSize As DropDownList = TryCast(control.FindControl("x_HouseSize"), DropDownList) |
Dim v_HouseSize As String = String.Empty |
For Each li As LIstItem In x_HouseSize.Items |
If (li.Selected) Then |
v_HouseSize += li.Value |
Exit For |
End If |
Next |
If (v_HouseSize <> String.Empty) Then |
row.HouseSize = v_HouseSize |
Else |
row.HouseSize = String.Empty |
End If |
' Field HouseKids |
Dim x_HouseKids As DropDownList = TryCast(control.FindControl("x_HouseKids"), DropDownList) |
Dim v_HouseKids As String = String.Empty |
For Each li As LIstItem In x_HouseKids.Items |
If (li.Selected) Then |
v_HouseKids += li.Value |
Exit For |
End If |
Next |
If (v_HouseKids <> String.Empty) Then |
row.HouseKids = v_HouseKids |
Else |
row.HouseKids = String.Empty |
End If |
' Field DecisionMkr |
Dim x_DecisionMkr As RadioButtonList = TryCast(control.FindControl("x_DecisionMkr"), RadioButtonList) |
Dim v_DecisionMkr As String = String.Empty |
For Each li As LIstItem In x_DecisionMkr.Items |
If (li.Selected) Then |
v_DecisionMkr += li.Value |
Exit For |
End If |
Next |
If (v_DecisionMkr <> String.Empty) Then |
row.DecisionMkr = v_DecisionMkr |
Else |
row.DecisionMkr = String.Empty |
End If |
' Field Consent |
Dim x_Consent As CheckBoxList = TryCast(control.FindControl("x_Consent"), CheckBoxList) |
Dim v_Consent As String = String.Empty |
For Each li As LIstItem In x_Consent.Items |
If (li.Selected) Then |
If (Not String.IsNullOrEmpty(v_Consent)) Then v_Consent += "," |
v_Consent += li.Value |
End If |
Next |
If (v_Consent <> String.Empty) Then |
row.Consent = v_Consent |
Else |
row.Consent = String.Empty |
End If |
End Sub |
' **************************** |
' * Check for duplicate Key |
' **************************** |
Private Function CheckDuplicateKey(ByVal control As WebControl) As ArrayList |
Dim sWhere As String = String.Empty |
Dim messageList As ArrayList = New ArrayList() |
Dim data As membersdal = New membersdal() |
Dim newkey As memberskey = New memberskey() |
Try |
' Check for duplicate Email |
sWhere = "([Email] = '" + Db.AdjustSql((CType(control.FindControl("x_Email"),TextBox)).Text) + "')" |
If (data.LoadList(sWhere) IsNot Nothing) Then |
messageList.Add("Duplicate value: Email") |
End If |
data = Nothing |
Catch e As Exception |
messageList.Add(e.Message) |
End Try |
Return IIf(messageList.Count = 0, Nothing, messageList) |
End Function |
' ******************************************** |
' * Convert Row Object Value To Input Control |
' ******************************************** |
Private Sub RowToControl(ByVal row As membersrow, ByVal control As WebControl, ByVal ct As CtrlType) |
If (row Is Nothing) Then Return' empty row object |
If (control Is Nothing) Then Return' empty control object |
If (ct = CtrlType.Edit) Then ' set up edit control |
' Field Email |
' Field Password |
' Field FirstName |
' Field LastName |
' Field StreetNum |
' Field StreetName |
' Field Suburb |
' Field City |
' Field State |
Dim x_State As DropDownList = TryCast(control.FindControl("x_State"), DropDownList) |
Dim v_State As String |
If (row.State IsNot Nothing) Then v_State = Convert.ToString(row.State) Else v_State = String.Empty |
' Field Telephone |
' Field Gender |
Dim x_Gender As RadioButtonList = TryCast(control.FindControl("x_Gender"), RadioButtonList) |
Dim v_Gender As String |
If (row.Gender IsNot Nothing) Then v_Gender = Convert.ToString(row.Gender) Else v_Gender = String.Empty |
' Field DOB |
' Field Education |
Dim x_Education As DropDownList = TryCast(control.FindControl("x_Education"), DropDownList) |
Dim v_Education As String |
If (row.Education IsNot Nothing) Then v_Education = Convert.ToString(row.Education) Else v_Education = String.Empty |
' Field MaritalStatus |
Dim x_MaritalStatus As DropDownList = TryCast(control.FindControl("x_MaritalStatus"), DropDownList) |
Dim v_MaritalStatus As String |
If (row.MaritalStatus IsNot Nothing) Then v_MaritalStatus = Convert.ToString(row.MaritalStatus) Else v_MaritalStatus = String.Empty |
' Field Born |
Dim x_Born As RadioButtonList = TryCast(control.FindControl("x_Born"), RadioButtonList) |
Dim v_Born As String |
If (row.Born IsNot Nothing) Then v_Born = Convert.ToString(row.Born) Else v_Born = String.Empty |
' Field Employment |
Dim x_Employment As DropDownList = TryCast(control.FindControl("x_Employment"), DropDownList) |
Dim v_Employment As String |
If (row.Employment IsNot Nothing) Then v_Employment = Convert.ToString(row.Employment) Else v_Employment = String.Empty |
' Field Occupation |
Dim x_Occupation As RadioButtonList = TryCast(control.FindControl("x_Occupation"), RadioButtonList) |
Dim v_Occupation As String |
If (row.Occupation IsNot Nothing) Then v_Occupation = Convert.ToString(row.Occupation) Else v_Occupation = String.Empty |
' Field Industry |
Dim x_Industry As RadioButtonList = TryCast(control.FindControl("x_Industry"), RadioButtonList) |
Dim v_Industry As String |
If (row.Industry IsNot Nothing) Then v_Industry = Convert.ToString(row.Industry) Else v_Industry = String.Empty |
' Field OrgSize |
Dim x_OrgSize As RadioButtonList = TryCast(control.FindControl("x_OrgSize"), RadioButtonList) |
Dim v_OrgSize As String |
If (row.OrgSize IsNot Nothing) Then v_OrgSize = Convert.ToString(row.OrgSize) Else v_OrgSize = String.Empty |
' Field Income |
Dim x_Income As RadioButtonList = TryCast(control.FindControl("x_Income"), RadioButtonList) |
Dim v_Income As String |
If (row.Income IsNot Nothing) Then v_Income = Convert.ToString(row.Income) Else v_Income = String.Empty |
' Field HouseSize |
Dim x_HouseSize As DropDownList = TryCast(control.FindControl("x_HouseSize"), DropDownList) |
Dim v_HouseSize As String |
If (row.HouseSize IsNot Nothing) Then v_HouseSize = Convert.ToString(row.HouseSize) Else v_HouseSize = String.Empty |
' Field HouseKids |
Dim x_HouseKids As DropDownList = TryCast(control.FindControl("x_HouseKids"), DropDownList) |
Dim v_HouseKids As String |
If (row.HouseKids IsNot Nothing) Then v_HouseKids = Convert.ToString(row.HouseKids) Else v_HouseKids = String.Empty |
' Field DecisionMkr |
Dim x_DecisionMkr As RadioButtonList = TryCast(control.FindControl("x_DecisionMkr"), RadioButtonList) |
Dim v_DecisionMkr As String |
If (row.DecisionMkr IsNot Nothing) Then v_DecisionMkr = Convert.ToString(row.DecisionMkr) Else v_DecisionMkr = String.Empty |
' Field Consent |
Dim x_Consent As CheckBoxList = TryCast(control.FindControl("x_Consent"), CheckBoxList) |
Dim v_Consent As String |
If (row.Consent IsNot Nothing) Then v_Consent = Convert.ToString(row.Consent) Else v_Consent = String.Empty |
End If |
End Sub |
' ************************************ |
' * Handler for DataSource Inserting |
' ************************************ |
Protected Sub membersDataSource_Inserting(ByVal sender As Object, ByVal e As ObjectDataSourceMethodEventArgs) |
Dim control As WebControl = membersDetailsView |
' Set up row object |
Dim row As membersrow = TryCast(e.InputParameters(0), membersrow) |
ControlToRow(row, control) |
If (membersbll.Inserting(row)) Then |
Else |
e.Cancel = True |
If (Not String.IsNullOrEmpty(objProfile.Message)) Then |
lblMessage.Text = objProfile.Message |
pnlMessage.Visible = True |
End If |
End If |
End Sub |
' *********************************** |
' * Handler for DataSource Inserted |
' *********************************** |
Protected Sub membersDataSource_Inserted(ByVal sender As Object, Byval e As ObjectDataSourceStatusEventArgs) |
If (e.Exception IsNot Nothing) Then |
e.AffectedRows = 0 |
e.ExceptionHandled = True |
lblMessage.Text = e.Exception.InnerException.Message |
pnlMessage.Visible = True |
Else |
newrow = TryCast(e.ReturnValue, membersrow) ' get new row objectinsert method |
membersbll.Inserted(newrow) |
End If |
End Sub |
' ******************* |
' * Get User Filter |
' ******************* |
Private Function GetUserFilter() As String |
Return membersinf.GetUserFilter() |
End Function |
</script> |
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server" /> |
<script type="text/javascript"> |
<!-- |
var ew_DateSep = "/"; // set date separator |
var ew_FieldSep = "<%= Share.ValueSeparator(0) %>"; // set value separator |
var ew_CurrencyDecimalSeparator = "<%=System.Globalization.NumberFormatInfo.CurrentInfo.CurrencyDecimalSeparator %>"; |
//--> |
</script> |
<script type="text/javascript"> |
<!-- |
var ew_DHTMLEditors = []; |
//--> |
</script> |
<script type="text/javascript"> |
<!-- |
var ew_MultiPagePage = "Page"; |
var ew_MultiPageOf = "of"; // multi-page Of Text |
var ew_MultiPagePrev = "Prev"; |
var ew_MultiPageNext = "Next"; |
var ew_PageIndex = 0; |
var ew_MaxPageIndex = 0; |
var ew_MinPageIndex = 0; |
//--> |
</script> |
<span class="aspnetmaker">Registration Page</span><br /> |
<p> |
<span class="aspnetmaker"><a href="login.aspx">Back to Login Page</a></span> |
<telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" Skin="Vista" /> |
</p> |
<asp:ValidationSummary id="xevs_members" CssClass="aspnetmaker" runat="server" |
HeaderText="" |
ShowSummary="False" |
ShowMessageBox="True" |
ForeColor="#FF0000" /> |
<asp:PlaceHolder ID="pnlMessage" runat="server" Visible="false"> |
<p><asp:Label id="lblMessage" forecolor="#FF0000" CssClass="aspnetmaker" runat="server" /></p> |
</asp:PlaceHolder> |
<!-- Data Source --> |
<asp:ObjectDataSource ID="membersDataSource" |
TypeName="members.membersdal" |
DataObjectTypeName="members.membersrow" |
InsertMethod="Insert" |
OnInserting="membersDataSource_Inserting" |
OnInserted="membersDataSource_Inserted" |
runat="server"> |
</asp:ObjectDataSource> |
<asp:DetailsView ID="membersDetailsView" |
DataKeyNames="member_id" |
DataSourceID="membersDataSource" |
DefaultMode="Insert" |
GridLines="None" |
AutoGenerateRows="False" CssClass="ewDetailTable" |
OnDataBound="membersDetailsView_DataBound" |
OnItemInserting="membersDetailsView_ItemInserting" |
OnItemInserted="membersDetailsView_ItemInserted" |
runat="server"> |
<RowStyle CssClass="ewTableRow" /> |
<AlternatingRowStyle CssClass="ewTableAltRow" /> |
<EditRowStyle /> |
<FooterStyle CssClass="ewTableFooter" /> |
<PagerStyle CssClass="ewTablePager" /> |
<Fields> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Email">Email<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_Email" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vx_Email" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Email" ErrorMessage="Please enter a valid email address" ForeColor="Red" Display="None" Text="*" /> |
<ew:EmailValidator ID="vc_Email" ClientValidationFunction="ew_CheckEmail" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Email" ErrorMessage="Please enter a valid email address" Display="None" ForeColor="Red" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Password">Password<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_Password" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vx_Password" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Password" ErrorMessage="Please insert a password" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xc_Password">Confirm Password<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="c_Password" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vc_Password" CssClass="aspnetmaker" runat="server" ControlToValidate="c_Password" ErrorMessage="Please insert a password" ForeColor="Red" Display="None" Text="*" /> |
<asp:CompareValidator ID="PasswordCompare" ControlToCompare="x_Password" |
ControlToValidate="c_Password" ErrorMessage="Mismatch Password" |
runat="server"></asp:CompareValidator> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_FirstName">First Name<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<telerik:RadTextBox ID="x_FirstName" runat="server"> |
</telerik:RadTextBox> |
<asp:RequiredFieldValidator ID="vx_FirstName" CssClass="aspnetmaker" runat="server" ControlToValidate="x_FirstName" ErrorMessage="Please give your first name" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_LastName">Last Name<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_LastName" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vx_LastName" CssClass="aspnetmaker" runat="server" ControlToValidate="x_LastName" ErrorMessage="Please give your last name" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_StreetNum">Street Num<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_StreetNum" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vx_StreetNum" CssClass="aspnetmaker" runat="server" ControlToValidate="x_StreetNum" ErrorMessage="Please enter required field - Street Num" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_StreetName">Street Name<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_StreetName" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vx_StreetName" CssClass="aspnetmaker" runat="server" ControlToValidate="x_StreetName" ErrorMessage="Please enter required field - Street Name" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Suburb">Suburb</asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_Suburb" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_City">City<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_City" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vx_City" CssClass="aspnetmaker" runat="server" ControlToValidate="x_City" ErrorMessage="Please input your closest city" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_State">State<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:DropDownList ID="x_State" CssClass="aspnetmaker" runat="server" > |
<asp:ListItem Value="">Please Select</asp:ListItem> |
<asp:ListItem Value="VIC">Victoria</asp:ListItem> |
<asp:ListItem Value="NSW">NSW</asp:ListItem> |
<asp:ListItem Value="ACT">ACT</asp:ListItem> |
<asp:ListItem Value="NT">Northern Territory</asp:ListItem> |
<asp:ListItem Value="QLD">Queensland</asp:ListItem> |
<asp:ListItem Value="SA">South Australia</asp:ListItem> |
<asp:ListItem Value="TAS">Tasmania</asp:ListItem> |
<asp:ListItem Value="WA">Western Australia</asp:ListItem> |
</asp:DropDownList> |
<asp:RequiredFieldValidator ID="vx_State" CssClass="aspnetmaker" runat="server" ControlToValidate="x_State" ErrorMessage="Please choose a state" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Telephone">Telephone<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:TextBox id="x_Telephone" Columns="30" MaxLength="50" CssClass="aspnetmaker" runat="server" /> |
<asp:RequiredFieldValidator ID="vx_Telephone" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Telephone" ErrorMessage="Please provide a telephone number" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Gender">Gender<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:RadioButtonList ID="x_Gender" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server"> |
<asp:ListItem Value="Male">Male</asp:ListItem> |
<asp:ListItem Value="Female">Female</asp:ListItem> |
</asp:RadioButtonList> |
<asp:RequiredFieldValidator ID="vx_Gender" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Gender" ErrorMessage="What is your gender?" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_DOB">DOB<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<telerik:RadDateInput ID="x_DOB" Runat="server" Skin="Telerik" |
EmptyMessage="dd/mm/yyyy" Label="Date of birth: " MaxDate="2000-12-31" |
MinDate="1900-01-01" SelectionOnFocus="SelectAll" |
ToolTip="Please enter your date of birth" Width="170"> |
</telerik:RadDateInput> |
<asp:RequiredFieldValidator ID="vx_DOB" CssClass="aspnetmaker" runat="server" ControlToValidate="x_DOB" ErrorMessage="Please enter your date of birth using the following format: dd/mm/yyyy" ForeColor="Red" Display="None" Text="*" /> |
<ew:EuroDateValidator ID="vc_DOB" ClientValidationFunction="ew_CheckEuroDate" CssClass="aspnetmaker" runat="server" ControlToValidate="x_DOB" ErrorMessage="Please enter your date of birth using the following format: dd/mm/yyyy" Display="None" ForeColor="Red" DateSeparator="/" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Education">Education<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:DropDownList ID="x_Education" CssClass="aspnetmaker" runat="server" > |
<asp:ListItem Value="">Please Select</asp:ListItem> |
<asp:ListItem Value="primary">Did not complete primary school</asp:ListItem> |
<asp:ListItem Value="secondary">Did not complete secondary school</asp:ListItem> |
<asp:ListItem Value="SchoolCertificateLow">School Certificate (lower)</asp:ListItem> |
<asp:ListItem Value="SchoolCertificateHigh">School Certificate (higher)</asp:ListItem> |
<asp:ListItem Value="Trade">Trade Certificate</asp:ListItem> |
<asp:ListItem Value="Diploma">Diploma</asp:ListItem> |
<asp:ListItem Value="Bachelors">Bachelor Degree</asp:ListItem> |
<asp:ListItem Value="Honours">Honours Degree</asp:ListItem> |
<asp:ListItem Value="Masters">Masters Degree</asp:ListItem> |
<asp:ListItem Value="PhD">PhD</asp:ListItem> |
</asp:DropDownList> |
<asp:RequiredFieldValidator ID="vx_Education" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Education" ErrorMessage="Please enter required field - Education" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_MaritalStatus">Marital Status<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:DropDownList ID="x_MaritalStatus" CssClass="aspnetmaker" runat="server" > |
<asp:ListItem Value="">Please Select</asp:ListItem> |
<asp:ListItem Value="Single">Single (never married)</asp:ListItem> |
<asp:ListItem Value="Married">Married</asp:ListItem> |
<asp:ListItem Value="defacto">In a partnership/defacto relationship</asp:ListItem> |
<asp:ListItem Value="Separated">Separated but not divorced</asp:ListItem> |
<asp:ListItem Value="Divorced">Divorced</asp:ListItem> |
<asp:ListItem Value="Widowed">Widowed</asp:ListItem> |
</asp:DropDownList> |
<asp:RequiredFieldValidator ID="vx_MaritalStatus" CssClass="aspnetmaker" runat="server" ControlToValidate="x_MaritalStatus" ErrorMessage="Please enter required field - Marital Status" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Born">Born<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:RadioButtonList ID="x_Born" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server"> |
<asp:ListItem Value="Y">Yes</asp:ListItem> |
<asp:ListItem Value="N">No</asp:ListItem> |
</asp:RadioButtonList> |
<asp:RequiredFieldValidator ID="vx_Born" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Born" ErrorMessage="Please enter required field - Born" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Employment">Employment<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:DropDownList ID="x_Employment" CssClass="aspnetmaker" runat="server" > |
<asp:ListItem Value="">Please Select</asp:ListItem> |
<asp:ListItem Value="Fulltime">Full time wage/salary earner (more than 30 hours per week)</asp:ListItem> |
<asp:ListItem Value="Parttime">Part time wage/salary earner</asp:ListItem> |
<asp:ListItem Value="Casual">Casual worker</asp:ListItem> |
<asp:ListItem Value="Self">Self employed</asp:ListItem> |
<asp:ListItem Value="Housewife">House wife/husband</asp:ListItem> |
<asp:ListItem Value="Retired">Retired</asp:ListItem> |
<asp:ListItem Value="Student">Student</asp:ListItem> |
<asp:ListItem Value="Unemployed">Not currently employed</asp:ListItem> |
</asp:DropDownList> |
<asp:RequiredFieldValidator ID="vx_Employment" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Employment" ErrorMessage="Please enter required field - Employment" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Occupation">Occupation<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:RadioButtonList ID="x_Occupation" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server"> |
<asp:ListItem Value="Manager">Manager or Administrator</asp:ListItem> |
<asp:ListItem Value="Professional">Professional (Scientist, Doctor, Lawyer, etc.)</asp:ListItem> |
<asp:ListItem Value="Tradesperson">Tradesperson</asp:ListItem> |
<asp:ListItem Value="ClericalSalesService">Clerical, Sales or Service Worker</asp:ListItem> |
<asp:ListItem Value="Labourer">Labourer (e.g. Cleaners or Factory Workers)</asp:ListItem> |
<asp:ListItem Value="Noneoftheabove">None of the above</asp:ListItem> |
</asp:RadioButtonList> |
<asp:RequiredFieldValidator ID="vx_Occupation" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Occupation" ErrorMessage="Please enter required field - Occupation" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Industry">Industry<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:RadioButtonList ID="x_Industry" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server"> |
<asp:ListItem Value="Agriculture">Agriculture, Forestry and Fishing</asp:ListItem> |
<asp:ListItem Value="Manufacturing">Manufacturing</asp:ListItem> |
<asp:ListItem Value="Mining">Mining</asp:ListItem> |
<asp:ListItem Value="Construction">Construction</asp:ListItem> |
<asp:ListItem Value="Wholesale">Wholesale Trade</asp:ListItem> |
<asp:ListItem Value="ElectricityGasWater">Electricity, Gas and Water</asp:ListItem> |
<asp:ListItem Value="Retail">Retail Trade</asp:ListItem> |
<asp:ListItem Value="Communications">Communications</asp:ListItem> |
<asp:ListItem Value="Hospitality">Hospitality Trade</asp:ListItem> |
<asp:ListItem Value="Transport">Transport</asp:ListItem> |
<asp:ListItem Value="FinanceInsurance">Finance and Insurance</asp:ListItem> |
<asp:ListItem Value="Property">Property Services</asp:ListItem> |
<asp:ListItem Value="LegalAccounting">Legal and Accounting</asp:ListItem> |
<asp:ListItem Value="ComputerInformationTechnology">Computer and Information Technology</asp:ListItem> |
<asp:ListItem Value="MarketingAdvertising">Marketing and Advertising</asp:ListItem> |
<asp:ListItem Value="Scientific">Scientific Research</asp:ListItem> |
<asp:ListItem Value="Government">Government</asp:ListItem> |
<asp:ListItem Value="Education">Education</asp:ListItem> |
<asp:ListItem Value="HealthCommunityServices">Health & Community Services</asp:ListItem> |
<asp:ListItem Value="PersonalServices">Personal Services</asp:ListItem> |
<asp:ListItem Value="Other">Other</asp:ListItem> |
<asp:ListItem Value=""></asp:ListItem> |
</asp:RadioButtonList> |
<asp:RequiredFieldValidator ID="vx_Industry" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Industry" ErrorMessage="Please enter required field - Industry" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_OrgSize">Org Size<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:RadioButtonList ID="x_OrgSize" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server"> |
<asp:ListItem Value="1">1</asp:ListItem> |
<asp:ListItem Value="2_9">2-9</asp:ListItem> |
<asp:ListItem Value="10_19">10-19</asp:ListItem> |
<asp:ListItem Value="20_49">20-49</asp:ListItem> |
<asp:ListItem Value="50_99">50-99</asp:ListItem> |
<asp:ListItem Value="100_499">100-499</asp:ListItem> |
<asp:ListItem Value="Morethan500">More than 500</asp:ListItem> |
</asp:RadioButtonList> |
<asp:RequiredFieldValidator ID="vx_OrgSize" CssClass="aspnetmaker" runat="server" ControlToValidate="x_OrgSize" ErrorMessage="Please enter required field - Org Size" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Income">Income<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:RadioButtonList ID="x_Income" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server"> |
<asp:ListItem Value="10000">Less than $9,999</asp:ListItem> |
<asp:ListItem Value="20000">$10,000 - $19,999</asp:ListItem> |
<asp:ListItem Value="30000">$20,000 - $29,999</asp:ListItem> |
<asp:ListItem Value="40000">$30,000 - $39,999</asp:ListItem> |
<asp:ListItem Value="50000">$40,000 - $49,999</asp:ListItem> |
<asp:ListItem Value="60000">$50,000 - $59,999</asp:ListItem> |
<asp:ListItem Value="70000">$60,000 - $69,999</asp:ListItem> |
<asp:ListItem Value="80000">$70,000 - $79,999</asp:ListItem> |
<asp:ListItem Value="90000">$80,000 - $89,999</asp:ListItem> |
<asp:ListItem Value="100000">$90,000 - $99,999</asp:ListItem> |
<asp:ListItem Value="150000">$100,000 - $149,999</asp:ListItem> |
<asp:ListItem Value="150000Plus">$150,000 or more</asp:ListItem> |
</asp:RadioButtonList> |
<asp:RequiredFieldValidator ID="vx_Income" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Income" ErrorMessage="Please enter required field - Income" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_HouseSize">House Size<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:DropDownList ID="x_HouseSize" CssClass="aspnetmaker" runat="server" > |
<asp:ListItem Value="">Please Select</asp:ListItem> |
<asp:ListItem Value="1">1</asp:ListItem> |
<asp:ListItem Value="2">2</asp:ListItem> |
<asp:ListItem Value="3">3</asp:ListItem> |
<asp:ListItem Value="4">4</asp:ListItem> |
<asp:ListItem Value="5">5</asp:ListItem> |
<asp:ListItem Value="6">6</asp:ListItem> |
<asp:ListItem Value="7">7</asp:ListItem> |
<asp:ListItem Value="8">8</asp:ListItem> |
<asp:ListItem Value="9">9</asp:ListItem> |
<asp:ListItem Value="10">10</asp:ListItem> |
<asp:ListItem Value="11">More than 10</asp:ListItem> |
</asp:DropDownList> |
<asp:RequiredFieldValidator ID="vx_HouseSize" CssClass="aspnetmaker" runat="server" ControlToValidate="x_HouseSize" ErrorMessage="Please enter required field - House Size" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_HouseKids">House Kids<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:DropDownList ID="x_HouseKids" CssClass="aspnetmaker" runat="server" > |
<asp:ListItem Value="">Please Select</asp:ListItem> |
<asp:ListItem Value="0">None</asp:ListItem> |
<asp:ListItem Value="1">1</asp:ListItem> |
<asp:ListItem Value="2">2</asp:ListItem> |
<asp:ListItem Value="3">3</asp:ListItem> |
<asp:ListItem Value="4">4</asp:ListItem> |
<asp:ListItem Value="5">5</asp:ListItem> |
<asp:ListItem Value="6">More than 5</asp:ListItem> |
</asp:DropDownList> |
<asp:RequiredFieldValidator ID="vx_HouseKids" CssClass="aspnetmaker" runat="server" ControlToValidate="x_HouseKids" ErrorMessage="Please enter required field - House Kids" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_DecisionMkr">Decision Mkr<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:RadioButtonList ID="x_DecisionMkr" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server"> |
<asp:ListItem Value="Yes">Yes</asp:ListItem> |
<asp:ListItem Value="Mostly">Mostly</asp:ListItem> |
<asp:ListItem Value="Sometimes">Sometimes</asp:ListItem> |
<asp:ListItem Value="Hardlyever">Hardly ever</asp:ListItem> |
</asp:RadioButtonList> |
<asp:RequiredFieldValidator ID="vx_DecisionMkr" CssClass="aspnetmaker" runat="server" ControlToValidate="x_DecisionMkr" ErrorMessage="Please enter required field - Decision Mkr" ForeColor="Red" Display="None" Text="*" /> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField> |
<HeaderStyle CssClass="ewTableHeader" /> |
<HeaderTemplate> |
<asp:Label runat="server" id="xs_Consent">Consent<span class='ewmsg'> *</span></asp:Label> |
</HeaderTemplate> |
<InsertItemTemplate> |
<asp:CheckBoxList ID="x_Consent" RepeatDirection="Horizontal" RepeatColumns="5" CssClass="aspnetmakerlist" runat="server" > |
<asp:ListItem Value="1">I agree to the terms and conditions</asp:ListItem> |
</asp:CheckBoxList> |
<ew:CheckBoxListValidator ID="vx_Consent" ClientValidationFunction="ew_CheckBoxListHasValue" CssClass="aspnetmaker" runat="server" ControlToValidate="x_Consent" ErrorMessage="You must agree to the terms and conditions to register" ForeColor="Red" Display="Dynamic" Text="*"/> |
</InsertItemTemplate> |
</asp:TemplateField> |
<asp:TemplateField ShowHeader="False"> |
<InsertItemTemplate> |
<asp:Button CommandName="Insert" Text="Register" CausesValidation="True" runat="server" /> |
<asp:HiddenField ID="k_member_id" Runat="server" Value='<%# Bind("member_id") %>' /> |
</InsertItemTemplate> |
</asp:TemplateField> |
</Fields> |
</asp:DetailsView> |
<div name="ewMultiPagePager" id="ewMultiPagePager" class="ewMultiPagePager"></div> |
<script type="text/javascript"> |
<!-- |
ew_InitMultiPage(); // Multi-page initialization |
//--> |
</script> |
</asp:Content> |