Link to home
Start Free TrialLog in
Avatar of Enflow
EnflowFlag for United States of America

asked on

How Correctly Create ASP.NET Code Behind Page & Move Code

Manual Creation of ASP.NET Code Behind Page... ?

Main Page: TCC.aspx

Code Behind Page: TCC.aspx.vb (see attached file)

Two Issues...

A. How do i Correctly Move The Code From TCC.aspx to my codebehind page... I am missing something ?
....When i move the code over and namespaces over i think i am missing a header i think or have the code wrong cause it is all red lines..
....I am using VStudio 2017 and it did not have a checkbox choice to create code behind page ?

and...

B. Can I change this to C# later (when i have it correct)  by just changing the Page Language to C# and rewriting the code behind modules in C# ??

TCC.aspx
<%@ Page Language="VB" AutoEventWireup="false" Codefile="TCC.aspx.vb" Inherits="TCC" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web.UI.Page" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.data.OleDb" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Page.EnableViewState = False
        DateToday.Text = Date.Today.ToString("MM'/'dd'/'yyyy")
        ADT_2.Text = Date.Today.ToString("MM'/'dd'/'yyyy")
        ADT_3.Text = Date.Today.ToString("MM'/'dd'/'yyyy")
        ADT_4.Text = Date.Today.ToString("MM'/'dd'/'yyyy")
        ADT_5.Text = Date.Today.ToString("MM'/'dd'/'yyyy")
        ADT_6.Text = Date.Today.ToString("MM'/'dd'/'yyyy")
        ADT_7.Text = Date.Today.ToString("MM'/'dd'/'yyyy")
        FirstName_Sig_1.Attributes.Add("readonly", "readonly")
        LastName_Sig_1.Attributes.Add("readonly", "readonly")
        AutoSN_1.Attributes.Add("readonly", "readonly")
        AutoSID.Attributes.Add("readonly", "readonly")
        FirstName_HoH_1.Attributes.Add("readonly", "readonly")
        LastName_HoH_1.Attributes.Add("readonly", "readonly")
        Address_HoH_1.Attributes.Add("readonly", "readonly")
        Address2_HoH_1.Attributes.Add("readonly", "readonly")
        City_HoH_1.Attributes.Add("readonly", "readonly")
        State_HoH_1.Attributes.Add("readonly", "readonly")
        Zipcode_HoH_1.Attributes.Add("readonly", "readonly")
        StudentID_HoH_1.Attributes.Add("readonly", "readonly")
        HomePhone_HoH_1.Attributes.Add("readonly", "readonly")
        EmgrPhone_HoH_1.Attributes.Add("readonly", "readonly")
        PersonalEmail_HoH_1.Attributes.Add("readonly", "readonly")
        CellPhone_HoH_1.Attributes.Add("readonly", "readonly")
        FirstName_Adult_1.Attributes.Add("readonly", "readonly")
        LastName_Adult_1.Attributes.Add("readonly", "readonly")
        Last4_SS_Adult_1.Attributes.Add("readonly", "readonly")
        ZipCode_Adult_1.Attributes.Add("readonly", "readonly")
        CellPhone_Adult_1.Attributes.Add("readonly", "readonly")
        BirthDate_Adult_1.Attributes.Add("readonly", "readonly")
        Signature_1.Attributes.Add("readonly", "readonly")
        GD_A_M_1.Attributes.Add("disabled", "disabled")
        GD_A_F_1.Attributes.Add("disabled", "disabled")
        GD_A_O_1.Attributes.Add("disabled", "disabled")
    End Sub

    Protected Sub SubmitME_Click(ByVal sender As Object, ByVal e As EventArgs) 'Send Data To DBase

        Dim rbGender_1 As String = "", rbPh_LvMsg As String = "", rbEmgrPh_LvMsg As String = "", rbOweMoney_1 As String = "", rbCreditBearing As String = ""
        Dim rbFafsaForm As String = "", rbDifficultFeed As String = "", rbNowHomeLess As String = "", rbRiskHomeLess As String = "", rbHousingTacoma As String = ""
        Dim cbEviction As String = "", cbMedicalIssues As String = "", cbNewTacoma As String = "", cbNaturalDisaster As String = "", cbFamilyCrisis As String = ""
        Dim cbDomesticViolence As String = "", cbLossIncome As String = "", cbSubstanceAbuse As String = "", cbOther As String = "", cbIagree As String = ""
        Dim rbGender_Adult_1 As String = "", rbFullTimeStudent_Adult_1 As String = "", rbGender_Adult_2 As String = "", rbFullTimeStudent_Adult_2 As String = ""
        Dim rbGender_Adult_3 As String = "", rbFullTimeStudent_Adult_3 As String = "", rbGender_Adult_4 As String = "", rbFullTimeStudent_Adult_4 As String = ""
        Dim rbGender_Child_1 As String = "", rbGender_Child_2 As String = "", rbGender_Child_3 As String = "", rbGender_Child_4 As String = "", rbOweMoney_2 As String = ""
        Dim rbGender_Child_5 As String = "", rbGender_Child_6 As String = "", rbCrimnalRecord As String = "", rbPayBillsLoan As String = ""
        Dim rbCurrPayChildCare As String = "", rbCheckingSavings As String = "", rbChildSupportPay As String = "", rbPayOverMedicalBill As String = "", cbPreg As String = ""

        Dim dpState As String = "WA", dpRace As String = "", dpMarital_1 As String = ""
        Dim dpMarital_2 As String = "", dpMarital_3 As String = "", dpMarital_4 As String = ""

        dpState = State_1.SelectedItem.Value : dpRace = Race.SelectedItem.Value
        dpMarital_1 = MaritalStatus_Adult_1.SelectedItem.Value : dpMarital_2 = MaritalStatus_Adult_2.SelectedItem.Value
        dpMarital_3 = MaritalStatus_Adult_3.SelectedItem.Value : dpMarital_4 = MaritalStatus_Adult_4.SelectedItem.Value

        'INSERT RABIOBUTTONLIST VALUES INTO THEIR VARIABLES
        rbGender_1 = Gender_1.SelectedValue ': Response.Write(rbGender_1 + Environment.NewLine)
        rbPh_LvMsg = Ph_LvMsg.SelectedValue ': Response.Write(rbPh_LvMsg + Environment.NewLine)
        rbOweMoney_1 = OweMoney_1.SelectedValue ': Response.Write(rbOweMoney_1 + Environment.NewLine)
        rbCreditBearing = CreditBearing.SelectedValue ': Response.Write(rbCreditBearing + Environment.NewLine)
        rbFafsaForm = FafsaForm.SelectedValue ': Response.Write(rbFafsaForm + Environment.NewLine)
        rbDifficultFeed = DifficultFeed.SelectedValue ': Response.Write(rbDifficultFeed + Environment.NewLine)
        rbNowHomeLess = NowHomeLess.SelectedValue ': Response.Write(rbNowHomeLess + Environment.NewLine)
        rbRiskHomeLess = RiskHomeLess.SelectedValue ': Response.Write(rbRiskHomeLess + Environment.NewLine)
        rbHousingTacoma = HousingTacoma.SelectedValue ': Response.Write(rbHousingTacoma + Environment.NewLine)
        rbFullTimeStudent_Adult_1 = FullTimeStudent_Adult_1.SelectedValue ': Response.Write(rbFullTimeStudent_Adult_1 + Environment.NewLine)
        rbOweMoney_2 = OweMoney_2.SelectedValue ': Response.Write(rbOweMoney_2 + Environment.NewLine)
        rbCrimnalRecord = CrimnalRecord.SelectedValue ': Response.Write(rbCrimnalRecord + Environment.NewLine)
        rbCurrPayChildCare = CurrPayChildCare.SelectedValue ': Response.Write(rbCurrPayChildCare + Environment.NewLine)
        rbCheckingSavings = CheckingSavings.SelectedValue ': Response.Write(rbCheckingSavings + Environment.NewLine)
        rbChildSupportPay = ChildSupportPay.SelectedValue ': Response.Write(rbChildSupportPay + Environment.NewLine)
        rbPayBillsLoan = PayBillsLoan.SelectedValue ': Response.Write(rbPayBillsLoan + Environment.NewLine)
        rbPayOverMedicalBill = PayOverMedicalBill.SelectedValue ': Response.Write(rbPayOverMedicalBill + Environment.NewLine)

        'INSERT RABIOBUTTON VALUES INTO THEIR VARIABLES
        'EmgrPh_LvMsg
        If LM_EP_Y.Checked = True Then
            rbEmgrPh_LvMsg = "Y"
        ElseIf LM_EP_N.Checked = True Then
            rbEmgrPh_LvMsg = "N"
        End If

        'Gender_Adult_1
        If GD_A_M_1.Checked = True Then
            rbGender_Adult_1 = "M"
        ElseIf GD_A_F_1.Checked = True Then
            rbGender_Adult_1 = "F"
        ElseIf GD_A_O_1.Checked = True Then
            rbGender_Adult_1 = "O"
        End If

        'Gender_Adult_2
        If GD_A_M_2.Checked = True Then
            rbGender_Adult_2 = "M"
        ElseIf GD_A_F_2.Checked = True Then
            rbGender_Adult_2 = "F"
        ElseIf GD_A_O_2.Checked = True Then
            rbGender_Adult_2 = "O"
        End If

        'Gender_Adult_3
        If GD_A_M_3.Checked = True Then
            rbGender_Adult_3 = "M"
        ElseIf GD_A_F_3.Checked = True Then
            rbGender_Adult_3 = "F"
        ElseIf GD_A_O_3.Checked = True Then
            rbGender_Adult_3 = "O"
        End If

        'Gender_Adult_4
        If GD_A_M_4.Checked = True Then
            rbGender_Adult_4 = "M"
        ElseIf GD_A_F_4.Checked = True Then
            rbGender_Adult_4 = "F"
        ElseIf GD_A_O_4.Checked = True Then
            rbGender_Adult_4 = "O"
        End If

        'FullTimeStudent_Adult_2
        If FT_A_2_Y.Checked = True Then
            rbFullTimeStudent_Adult_2 = "Y"
        ElseIf FT_A_2_N.Checked = True Then
            rbFullTimeStudent_Adult_2 = "N"
        End If

        'FullTimeStudent_Adult_3
        If FT_A_3_Y.Checked = True Then
            rbFullTimeStudent_Adult_3 = "Y"
        ElseIf FT_A_3_N.Checked = True Then
            rbFullTimeStudent_Adult_3 = "N"
        End If

        'FullTimeStudent_Adult_4
        If FT_A_4_Y.Checked = True Then
            rbFullTimeStudent_Adult_4 = "Y"
        ElseIf FT_A_4_N.Checked = True Then
            rbFullTimeStudent_Adult_4 = "N"
        End If

        'Gender_Child_1
        If GD_C_M_1.Checked = True Then
            rbGender_Child_1 = "M"
        ElseIf GD_C_F_1.Checked = True Then
            rbGender_Child_1 = "F"
        ElseIf GD_C_O_1.Checked = True Then
            rbGender_Child_1 = "O"
        End If

        'Gender_Child_2
        If GD_C_M_2.Checked = True Then
            rbGender_Child_2 = "M"
        ElseIf GD_C_F_2.Checked = True Then
            rbGender_Child_2 = "F"
        ElseIf GD_C_O_2.Checked = True Then
            rbGender_Child_2 = "O"
        End If

        'Gender_Child_3
        If GD_C_M_3.Checked = True Then
            rbGender_Child_3 = "M"
        ElseIf GD_C_F_3.Checked = True Then
            rbGender_Child_3 = "F"
        ElseIf GD_C_O_3.Checked = True Then
            rbGender_Child_3 = "O"
        End If

        'Gender_Child_4
        If GD_C_M_4.Checked = True Then
            rbGender_Child_4 = "M"
        ElseIf GD_C_F_4.Checked = True Then
            rbGender_Child_4 = "F"
        ElseIf GD_C_O_4.Checked = True Then
            rbGender_Child_4 = "O"
        End If

        'Gender_Child_5
        If GD_C_M_5.Checked = True Then
            rbGender_Child_5 = "M"
        ElseIf GD_C_F_5.Checked = True Then
            rbGender_Child_5 = "F"
        ElseIf GD_C_O_5.Checked = True Then
            rbGender_Child_5 = "O"
        End If

        'Gender_Child_6
        If GD_C_M_6.Checked = True Then
            rbGender_Child_6 = "M"
        ElseIf GD_C_F_6.Checked = True Then
            rbGender_Child_6 = "F"
        ElseIf GD_C_O_6.Checked = True Then
            rbGender_Child_6 = "O"
        End If

        'INSERT CHECKBOX VALUES INTO THEIR VARIABLES
        If Eviction.Checked = True Then cbEviction = "Y" Else cbEviction = "N"
        If MedicalIssues.Checked = True Then cbMedicalIssues = "Y" Else cbMedicalIssues = "N"
        If NewTacoma.Checked = True Then cbNewTacoma = "Y" Else cbNewTacoma = "N"
        If NaturalDisaster.Checked = True Then cbNaturalDisaster = "Y" Else cbNaturalDisaster = "N"
        If FamilyCrisis.Checked = True Then cbFamilyCrisis = "Y" Else cbFamilyCrisis = "N"
        If DomesticViolence.Checked = True Then cbDomesticViolence = "Y" Else cbDomesticViolence = "N"
        If LossIncome.Checked = True Then cbLossIncome = "Y" Else cbLossIncome = "N"
        If SubstanceAbuse.Checked = True Then cbSubstanceAbuse = "Y" Else cbSubstanceAbuse = "N"
        If Other.Checked = True Then cbOther = "Y" Else cbOther = "N"
        If IAgree.Checked = True Then cbIagree = "Y" Else cbIagree = "N"
        If iPreg.Checked = True Then cbPreg = "Y" Else cbPreg = "N"

        Dim con As SqlConnection = New SqlConnection("Data Source=MY64BIT-PC\SQLEXPRESS;Initial Catalog=HousingAuthority;Persist Security Info=false;User ID=Web_App_Tcc;Password=CcT_ppA_beW_11")
        Dim cmd As SqlCommand = New SqlCommand("insert into tblapplication(" _
    & "FirstName_1,LastName_1,Gender_1,Last4_SS_1,StudentID_1,Race,Address_1,Address2_1,City_1,State_1," _
    & "Zipcode_1,BirthDate_1,TacomaEmail,PersonalEmail_1,Phone_1,Ph_LvMsg,EmgrPhone_1,EmgrPh_LvMsg,CellPhone_1,TCC_Studies," _
    & "OweMoney_1,CreditBearing,FafsaForm,DifficultFeed,NowHomeLess,RiskHomeLess,HousingTacoma,Eviction,MedicalIssues,NewTacoma," _
    & "NaturalDisaster,FamilyCrisis,DomesticViolence,LossIncome,SubstanceAbuse,Other,MoreOther,MoreDetail,AgencyName_1,AgencyPhone_1," _
    & "AgencyContact_1,AgencyName_2,AgencyPhone_2,AgencyContact_2,AgencyName_3,AgencyPhone_3,AgencyContact_3,FirstName_Sig_1," _
    & "LastName_Sig_1,FullName_Sig_1,DateToday,Iagree,FirstName_HoH_1,LastName_HoH_1,Address_HoH_1,Address2_HoH_1," _
    & "City_HoH_1,State_HoH_1,Zipcode_HoH_1,StudentID_HoH_1,HomePhone_HoH_1,EmgrPhone_HoH_1,PersonalEmail_HoH_1," _
    & "CellPhone_HoH_1,FirstName_Adult_1,LastName_Adult_1,RelToHoH_Adult_1,Last4_SS_Adult_1,ZipCode_Adult_1,CellPhone_Adult_1," _
    & "BirthDate_Adult_1,Gender_Adult_1,MaritalStatus_Adult_1,FullTimeStudent_Adult_1,FirstName_Adult_2,LastName_Adult_2,RelToHoH_Adult_2," _
    & "Last4_SS_Adult_2,ZipCode_Adult_2,CellPhone_Adult_2,BirthDate_Adult_2,Gender_Adult_2,MaritalStatus_Adult_2,FullTimeStudent_Adult_2," _
    & "FirstName_Adult_3,LastName_Adult_3,RelToHoH_Adult_3,Last4_SS_Adult_3,ZipCode_Adult_3,CellPhone_Adult_3,BirthDate_Adult_3," _
    & "Gender_Adult_3,MaritalStatus_Adult_3,FullTimeStudent_Adult_3,FirstName_Adult_4,LastName_Adult_4,RelToHoH_Adult_4,Last4_SS_Adult_4," _
    & "ZipCode_Adult_4,CellPhone_Adult_4,BirthDate_Adult_4,Gender_Adult_4,MaritalStatus_Adult_4,FullTimeStudent_Adult_4,FirstName_Child_1," _
    & "LastName_Child_1,Gender_Child_1,Last4_SS_Child_1,SchoolName_Child_1,BirthDate_Child_1,RelToHoh_Child_1,AbsentParent_Child_1," _
    & "FirstName_Child_2,LastName_Child_2,Gender_Child_2,Last4_SS_Child_2,SchoolName_Child_2,BirthDate_Child_2,RelToHoh_Child_2," _
    & "AbsentParent_Child_2,FirstName_Child_3,LastName_Child_3,Gender_Child_3,Last4_SS_Child_3,SchoolName_Child_3,BirthDate_Child_3," _
    & "RelToHoh_Child_3,AbsentParent_Child_3,FirstName_Child_4,LastName_Child_4,Gender_Child_4,Last4_SS_Child_4,SchoolName_Child_4," _
    & "BirthDate_Child_4,RelToHoh_Child_4,AbsentParent_Child_4,FirstName_Child_5,LastName_Child_5,Gender_Child_5,Last4_SS_Child_5," _
    & "SchoolName_Child_5,BirthDate_Child_5,RelToHoh_Child_5,AbsentParent_Child_5,FirstName_Child_6,LastName_Child_6,Gender_Child_6," _
    & "Last4_SS_Child_6,SchoolName_Child_6,BirthDate_Child_6,RelToHoh_Child_6,AbsentParent_Child_6,OweMoney_2,CrimnalRecord," _
    & "FamMembName_1,ImcomeSource_1,MonthlyAmount_1,ListEmployer_1,FamMembName_2,ImcomeSource_2,MonthlyAmount_2,ListEmployer_2," _
    & "FamMembName_3,ImcomeSource_3,MonthlyAmount_3,ListEmployer_3,FamMembName_4,ImcomeSource_4,MonthlyAmount_4,ListEmployer_4," _
    & "CurrPayChildCare,CheckingSavings,ChildSupportPay,PayBillsLoan,PayOverMedicalBill,Signature_1,Signature_2,Signature_3,Signature_4," _
    & "Signature_5,Signature_6,CR_Names,CS_Names,PB_Names, iPreg, DueDate)" _
    & "VALUES(@1,@2,@3,@4,@5,@6,@7,@8,@9,@10,@11,@12,@13,@14,@15,@16,@17,@18,@19,@20,@21,@22,@23,@24,@25,@26,@27,@28,@29,@30,@31,@32,@33,@34,@35,@36,@37,@38,@39," _
    & "@40,@41,@42,@43,@44,@45,@46,@47,@48,@49,@50,@51,@52,@53,@54,@55,@56,@57,@58,@59,@60,@61,@62,@63,@64,@65,@66,@67,@68,@69,@70,@71,@72,@73,@74,@75,@76,@77," _
    & "@78,@79,@80,@81,@82,@83,@84,@85,@86,@87,@88,@89,@90,@91,@92,@93,@94,@95,@96,@97,@98,@99,@100,@101,@102,@103,@104,@105,@106,@107,@108,@109,@110,@111,@112," _
    & "@113,@114,@115,@116,@117,@118,@119,@120,@121,@122,@123,@124,@125,@126,@127,@128,@129,@130,@131,@132,@133,@134,@135,@136,@137,@138,@139,@140,@141,@142," _
    & "@143,@144,@145,@146,@147,@148,@149,@150,@151,@152,@153,@154,@155,@156,@157,@158,@159,@160,@161,@162,@163,@164,@165,@166,@167,@168,@169,@170,@171,@172," _
    & "@173,@174,@175,@176,@177,@178,@179,@180,@181,@182,@183,@184,@185,@186)", con)

        With cmd.Parameters
            .AddWithValue("@1", FirstName_1.Text)
            .AddWithValue("@2", LastName_1.Text)
            .AddWithValue("@3", rbGender_1)
            .AddWithValue("@4", Last4_SS_1.Text)
            .AddWithValue("@5", StudentID_1.Text)
            .AddWithValue("@6", dpRace)
            .AddWithValue("@7", Address_1.Text)
            .AddWithValue("@8", Address2_1.Text)
            .AddWithValue("@9", City_1.Text)
            .AddWithValue("@10", dpState)
            .AddWithValue("@11", Zipcode_1.Text)
            .AddWithValue("@12", BirthDate_1.Text)
            .AddWithValue("@13", TacomaEmail.Text)
            .AddWithValue("@14", PersonalEmail_1.Text)
            .AddWithValue("@15", Phone_1.Text)
            .AddWithValue("@16", rbPh_LvMsg)
            .AddWithValue("@17", EmgrPhone_1.Text)
            .AddWithValue("@18", rbEmgrPh_LvMsg)
            .AddWithValue("@19", CellPhone_1.Text)
            .AddWithValue("@20", TCC_Studies.Text)
            .AddWithValue("@21", rbOweMoney_1)
            .AddWithValue("@22", rbCreditBearing)
            .AddWithValue("@23", rbFafsaForm)
            .AddWithValue("@24", rbDifficultFeed)
            .AddWithValue("@25", rbNowHomeLess)
            .AddWithValue("@26", rbRiskHomeLess)
            .AddWithValue("@27", rbHousingTacoma)
            .AddWithValue("@28", cbEviction)
            .AddWithValue("@29", cbMedicalIssues)
            .AddWithValue("@30", cbNewTacoma)
            .AddWithValue("@31", cbNaturalDisaster)
            .AddWithValue("@32", cbFamilyCrisis)
            .AddWithValue("@33", cbDomesticViolence)
            .AddWithValue("@34", cbLossIncome)
            .AddWithValue("@35", cbSubstanceAbuse)
            .AddWithValue("@36", cbOther)
            .AddWithValue("@37", MoreOther.Text)
            .AddWithValue("@38", MoreDetail.Text)
            .AddWithValue("@39", AgencyName_1.Text)
            .AddWithValue("@40", AgencyPhone_1.Text)
            .AddWithValue("@41", AgencyContact_1.Text)
            .AddWithValue("@42", AgencyName_2.Text)
            .AddWithValue("@43", AgencyPhone_2.Text)
            .AddWithValue("@44", AgencyContact_2.Text)
            .AddWithValue("@45", AgencyName_3.Text)
            .AddWithValue("@46", AgencyPhone_3.Text)
            .AddWithValue("@47", AgencyContact_3.Text)
            .AddWithValue("@48", FirstName_Sig_1.Text)
            .AddWithValue("@49", LastName_Sig_1.Text)
            .AddWithValue("@50", FullName_Sig_1.Text)
            .AddWithValue("@51", DateToday.Text)
            .AddWithValue("@52", cbIagree)
            .AddWithValue("@53", FirstName_HoH_1.Text)
            .AddWithValue("@54", LastName_HoH_1.Text)
            .AddWithValue("@55", Address_HoH_1.Text)
            .AddWithValue("@56", Address2_HoH_1.Text)
            .AddWithValue("@57", City_HoH_1.Text)
            .AddWithValue("@58", dpState)
            .AddWithValue("@59", Zipcode_HoH_1.Text)
            .AddWithValue("@60", StudentID_HoH_1.Text)
            .AddWithValue("@61", HomePhone_HoH_1.Text)
            .AddWithValue("@62", EmgrPhone_HoH_1.Text)
            .AddWithValue("@63", PersonalEmail_HoH_1.Text)
            .AddWithValue("@64", CellPhone_HoH_1.Text)
            .AddWithValue("@65", FirstName_Adult_1.Text) 'FN
            .AddWithValue("@66", LastName_Adult_1.Text) 'LN
            .AddWithValue("@67", RelToHoH_Adult_1.Text) 'RH
            .AddWithValue("@68", Last4_SS_Adult_1.Text) 'L4
            .AddWithValue("@69", ZipCode_Adult_1.Text) 'ZC
            .AddWithValue("@70", CellPhone_Adult_1.Text) 'CP
            .AddWithValue("@71", BirthDate_Adult_1.Text) 'BD
            .AddWithValue("@72", rbGender_1) 'GD
            .AddWithValue("@73", dpMarital_1) 'MS
            .AddWithValue("@74", rbFullTimeStudent_Adult_1) 'FTS
            .AddWithValue("@75", FirstName_Adult_2.Text)
            .AddWithValue("@76", LastName_Adult_2.Text)
            .AddWithValue("@77", RelToHoH_Adult_2.Text)
            .AddWithValue("@78", Last4_SS_Adult_2.Text)
            .AddWithValue("@79", ZipCode_Adult_2.Text)
            .AddWithValue("@80", CellPhone_Adult_2.Text)
            .AddWithValue("@81", BirthDate_Adult_2.Text)
            .AddWithValue("@82", rbGender_Adult_2)
            .AddWithValue("@83", dpMarital_2)
            .AddWithValue("@84", rbFullTimeStudent_Adult_2)
            .AddWithValue("@85", FirstName_Adult_3.Text)
            .AddWithValue("@86", LastName_Adult_3.Text)
            .AddWithValue("@87", RelToHoH_Adult_3.Text)
            .AddWithValue("@88", Last4_SS_Adult_3.Text)
            .AddWithValue("@89", ZipCode_Adult_3.Text)
            .AddWithValue("@90", CellPhone_Adult_3.Text)
            .AddWithValue("@91", BirthDate_Adult_3.Text)
            .AddWithValue("@92", rbGender_Adult_3)
            .AddWithValue("@93", dpMarital_3)
            .AddWithValue("@94", rbFullTimeStudent_Adult_3)
            .AddWithValue("@95", FirstName_Adult_4.Text)
            .AddWithValue("@96", LastName_Adult_4.Text)
            .AddWithValue("@97", RelToHoH_Adult_4.Text)
            .AddWithValue("@98", Last4_SS_Adult_4.Text)
            .AddWithValue("@99", ZipCode_Adult_4.Text)
            .AddWithValue("@100", CellPhone_Adult_4.Text)
            .AddWithValue("@101", BirthDate_Adult_4.Text)
            .AddWithValue("@102", rbGender_Adult_4)
            .AddWithValue("@103", dpMarital_4)
            .AddWithValue("@104", rbFullTimeStudent_Adult_4)
            .AddWithValue("@105", FirstName_Child_1.Text)
            .AddWithValue("@106", LastName_Child_1.Text)
            .AddWithValue("@107", rbGender_Child_1)
            .AddWithValue("@108", Last4_SS_Child_1.Text)
            .AddWithValue("@109", SchoolName_Child_1.Text)
            .AddWithValue("@110", BirthDate_Child_1.Text)
            .AddWithValue("@111", RelToHoh_Child_1.Text)
            .AddWithValue("@112", AbsentParent_Child_1.Text)
            .AddWithValue("@113", FirstName_Child_2.Text)
            .AddWithValue("@114", LastName_Child_2.Text)
            .AddWithValue("@115", rbGender_Child_2)
            .AddWithValue("@116", Last4_SS_Child_2.Text)
            .AddWithValue("@117", SchoolName_Child_2.Text)
            .AddWithValue("@118", BirthDate_Child_2.Text)
            .AddWithValue("@119", RelToHoh_Child_2.Text)
            .AddWithValue("@120", AbsentParent_Child_2.Text)
            .AddWithValue("@121", FirstName_Child_3.Text)
            .AddWithValue("@122", LastName_Child_3.Text)
            .AddWithValue("@123", rbGender_Child_3)
            .AddWithValue("@124", Last4_SS_Child_3.Text)
            .AddWithValue("@125", SchoolName_Child_3.Text)
            .AddWithValue("@126", BirthDate_Child_3.Text)
            .AddWithValue("@127", RelToHoh_Child_3.Text)
            .AddWithValue("@128", AbsentParent_Child_3.Text)
            .AddWithValue("@129", FirstName_Child_4.Text)
            .AddWithValue("@130", LastName_Child_4.Text)
            .AddWithValue("@131", rbGender_Child_4)
            .AddWithValue("@132", Last4_SS_Child_4.Text)
            .AddWithValue("@133", SchoolName_Child_4.Text)
            .AddWithValue("@134", BirthDate_Child_4.Text)
            .AddWithValue("@135", RelToHoh_Child_4.Text)
            .AddWithValue("@136", AbsentParent_Child_4.Text)
            .AddWithValue("@137", FirstName_Child_5.Text)
            .AddWithValue("@138", LastName_Child_5.Text)
            .AddWithValue("@139", rbGender_Child_5)
            .AddWithValue("@140", Last4_SS_Child_5.Text)
            .AddWithValue("@141", SchoolName_Child_5.Text)
            .AddWithValue("@142", BirthDate_Child_5.Text)
            .AddWithValue("@143", RelToHoh_Child_5.Text)
            .AddWithValue("@144", AbsentParent_Child_5.Text)
            .AddWithValue("@145", FirstName_Child_6.Text)
            .AddWithValue("@146", LastName_Child_6.Text)
            .AddWithValue("@147", rbGender_Child_6)
            .AddWithValue("@148", Last4_SS_Child_6.Text)
            .AddWithValue("@149", SchoolName_Child_6.Text)
            .AddWithValue("@150", BirthDate_Child_6.Text)
            .AddWithValue("@151", RelToHoh_Child_6.Text)
            .AddWithValue("@152", AbsentParent_Child_6.Text)
            .AddWithValue("@153", rbOweMoney_2)
            .AddWithValue("@154", rbCrimnalRecord)
            .AddWithValue("@155", FamMembName_1.Text)
            .AddWithValue("@156", ImcomeSource_1.Text)
            .AddWithValue("@157", MonthlyAmount_1.Text)
            .AddWithValue("@158", ListEmployer_1.Text)
            .AddWithValue("@159", FamMembName_2.Text)
            .AddWithValue("@160", ImcomeSource_2.Text)
            .AddWithValue("@161", MonthlyAmount_2.Text)
            .AddWithValue("@162", ListEmployer_2.Text)
            .AddWithValue("@163", FamMembName_3.Text)
            .AddWithValue("@164", ImcomeSource_3.Text)
            .AddWithValue("@165", MonthlyAmount_3.Text)
            .AddWithValue("@166", ListEmployer_3.Text)
            .AddWithValue("@167", FamMembName_4.Text)
            .AddWithValue("@168", ImcomeSource_4.Text)
            .AddWithValue("@169", MonthlyAmount_4.Text)
            .AddWithValue("@170", ListEmployer_4.Text)
            .AddWithValue("@171", rbCurrPayChildCare)
            .AddWithValue("@172", rbCheckingSavings)
            .AddWithValue("@173", rbChildSupportPay)
            .AddWithValue("@174", rbPayBillsLoan)
            .AddWithValue("@175", rbPayOverMedicalBill)
            .AddWithValue("@176", Signature_1.Text)
            .AddWithValue("@177", Signature_2.Text)
            .AddWithValue("@178", Signature_3.Text)
            .AddWithValue("@179", Signature_4.Text)
            .AddWithValue("@180", Signature_5.Text)
            .AddWithValue("@181", Signature_6.Text)
            .AddWithValue("@182", CR_Names.Text)
            .AddWithValue("@183", CS_Names.Text)
            .AddWithValue("@184", PB_Names.Text)
            .AddWithValue("@185", cbPreg)
            .AddWithValue("@186", DueDate.Text)
        End With
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
    End Sub
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To use C#, you can re-create the whole project by selecting C# as code behind language?
Avatar of Enflow

ASKER

@David...
Thanks... I created the Web Form with an aspx file that WAS CREATED OUTSIDE of Visual Studio...   www.enflow.com/CC/P1/DIV.aspx

I think i need to create a Solution in VS and then add my outside file to it and my css and then create a code behind file from what i can see in your video... I am/was trying to MANUALLY CREATE the code behind file.

I am not that familiar or handy with Visual Studio... i have the Community Version