public void AssignValue() { SqlConnection Connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["OnlineAdmission"].ConnectionString); DataTable dtbl = new DataTable(); try { string Query = ("SELECT * FROM STUDENT_DETAILS WITH(NOLOCK) WHERE APPLICATION_ID = @Student_ID"); SqlCommand Command = new SqlCommand(Query, Connection); Command.Parameters.Add(new SqlParameter("@Student_ID", Student_ID)); Connection.Open(); dtbl.Load(Command.ExecuteReader()); } catch (Exception E) { Session["ErrorMessage"] = Convert.ToString(E); Response.Redirect("ApplicationError.aspx"); } finally { Connection.Close(); } lblAplNo.Text = (dtbl.Rows[0]["APPLICATION_ID"].ToString()); lblName.Text = (dtbl.Rows[0]["FIRST_NAME"].ToString()); lblMiddleName.Text = (dtbl.Rows[0]["MIDDLE_NAME"].ToString()); lblSurname.Text = (dtbl.Rows[0]["SURNAME"].ToString()); lblGender.Text = (dtbl.Rows[0]["GENDER"].ToString()); lblMotherTongue.Text = (dtbl.Rows[0]["MOTHER_TONGUE"].ToString()); lblReligion.Text = (dtbl.Rows[0]["RELIGION"].ToString()); lblCasteSubCaste.Text = (dtbl.Rows[0]["CASTE_SUB_CASTE"].ToString()); DOB = (dtbl.Rows[0]["DATE_OF_BIRTH"].ToString()); lblDOB.Text = DOB.Substring(0, DOB.Length - 11) + DOBWords; lblPlaceOfBirth.Text = (dtbl.Rows[0]["PLACE_OF_BIRTH"].ToString()); lblResidentialAddress.Text = (dtbl.Rows[0]["RESIDENTIAL_ADDRESS"].ToString()); lblArea.Text = (dtbl.Rows[0]["AREA"].ToString()); lblAadharNumber.Text = (dtbl.Rows[0]["AADHAR_NUMBER"].ToString()); lblMedicalHistory.Text = (dtbl.Rows[0]["MEDICAL_HISTORY"].ToString()); lblOtherInfo.Text = (dtbl.Rows[0]["ADDITIONAL_INFORMATION"].ToString()); lblFathersName.Text = (dtbl.Rows[0]["FATHERS_NAME"].ToString()); lblFatherQualification.Text = (dtbl.Rows[0]["FATHERS_QUALIFICATION"].ToString()); lblFatherOccupation.Text = (dtbl.Rows[0]["FATHERS_OCCUPATION"].ToString()); lblFatherNative.Text = (dtbl.Rows[0]["FATHERS_NATIVE_PLACE"].ToString()); lblFathersEmail.Text = (dtbl.Rows[0]["FATHERS_EMAIL"].ToString()); lblFatherTelephone.Text = (dtbl.Rows[0]["FATHERS_TELEPHONE"].ToString()); lblFatherMobile.Text = (dtbl.Rows[0]["FATHERS_MOBILE_NUMBER"].ToString()); lblFatherWhatsapp.Text = (dtbl.Rows[0]["FATHERS_WHATSAPP_NUMBER"].ToString()); lblFatherResidentialAddress.Text = (dtbl.Rows[0]["FATHERS_RESIDENTIAL_ADDRESS"].ToString()); lblFatherOfficeAddress.Text = (dtbl.Rows[0]["FATHERS_OFFICE_ADDRESS"].ToString()); lblFatherOfficeTelephone.Text = (dtbl.Rows[0]["FATHERS_OFFICE_TELEPHONE_NUMBER"].ToString()); lblFatherPAN.Text = (dtbl.Rows[0]["FATHERS_PAN_NUMBER"].ToString()); lblFatherAadharNumber.Text = (dtbl.Rows[0]["FATHERS_AADHAR_NUMBER"].ToString()); lblMothersName.Text = (dtbl.Rows[0]["MOTHERS_NAME"].ToString()); lblMotherMaidenName.Text = (dtbl.Rows[0]["MOTHERS_MAIDEN_NAME"].ToString()); lblMotherQualification.Text = (dtbl.Rows[0]["MOTHERS_QUALIFICATION"].ToString()); lblMotherOccupation.Text = (dtbl.Rows[0]["MOTHERS_OCCUPATION"].ToString()); lblMotherNative.Text = (dtbl.Rows[0]["MOTHERS_NATIVE_PLACE"].ToString()); lblMothersEmail.Text = (dtbl.Rows[0]["MOTHERS_EMAIL"].ToString()); lblMotherTelephone.Text = (dtbl.Rows[0]["MOTHERS_TELEPHONE"].ToString()); lblMotherMobile.Text = (dtbl.Rows[0]["MOTHERS_MOBILE_NUMBER"].ToString()); lblMotherWhatsApp.Text = (dtbl.Rows[0]["MOTHERS_WHATSAPP_NUMBER"].ToString()); lblMotherResidentialAddress.Text = (dtbl.Rows[0]["MOTHERS_RESIDENTIAL_ADDRESS"].ToString()); lblMotherOfficeAddress.Text = (dtbl.Rows[0]["MOTHERS_OFFICE_ADDRESS"].ToString()); lblMotherOfficeTelephone.Text = (dtbl.Rows[0]["MOTHERS_OFFICE_TELEPHONE_NUMBER"].ToString()); lblMotherPAN.Text = (dtbl.Rows[0]["MOTHERS_PAN_NUMBER"].ToString()); lblMotherAadharNumber.Text = (dtbl.Rows[0]["MOTHERS_AADHAR_NUMBER"].ToString()); lblRelatedStudent.Text = (dtbl.Rows[0]["RELATION_IN_SCHOOL"].ToString()); lblRelatedStudentName.Text = (dtbl.Rows[0]["RELATION_NAME"].ToString()); lblRelatedStudentSection.Text = (dtbl.Rows[0]["RELATION_SECTION"].ToString()); lblRelatedStudentStandard.Text = (dtbl.Rows[0]["RELATION_STANDARD"].ToString()); lblRelatedStudentDivision.Text = (dtbl.Rows[0]["RELATION_DIVISION"].ToString()); lblFamilyIncome.Text = (dtbl.Rows[0]["FAMILY_INCOME"].ToString()); }