I have a web form that has 21 textboxes that are populated with data from a database. I set a masking to these textboxes and when I debug it the masking does not work. Am I forgetting something? The masking works for the other textboxes that you would have to enter data but not the populated ones. Please help. Thanks.
Here is the masking code:
<script src="Scripts/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.maskMoney.js" type="text/javascript"></script>
<script type='text/javascript'>
$(document).ready(function () {
$("#TextBoxLYTROA").maskMoney();
$("#TextBoxLYInstr").maskMoney();
$("#TextBoxRes").maskMoney();
$("#TextBoxPubS").maskMoney();
$("#TextBoxAcad").maskMoney();
$("#TextBoxStudS").maskMoney();
$("#TextBoxInstiS").maskMoney();
$("#TextBoxOperM").maskMoney();
$("#TextBoxAuxE").maskMoney();
$("#TextBoxHosS").maskMoney();
$("#TextBoxIndeO").maskMoney();
$("#TextBoxOED").maskMoney();
$("#TextBoxTA").maskMoney();
$("#TextBoxTL").maskMoney();
$("#TextBoxTUNA").maskMoney();
$("#TextBoxETRNA").maskMoney();
$("#TextBoxNPRNA").maskMoney();
$("#TextBoxTR").maskMoney();
$("#TextBoxTFN").maskMoney();
$("#TextBoxCD").maskMoney();
$("#TextBoxLTD").maskMoney();
});
</script>
Here is my populated code:
SqlConnection con4 = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["HotConnectionString"].ConnectionString);
con4.Open();
SqlCommand scmd4 = new SqlCommand("Select INST_ID, TOTAL_REVE, DATE, INSTRUCTIO, RESEARCH, PUBLIC_SER, ACADEMIC_S, STUDENT_SE, INSTITUTIO, PHYSICAL_P, SCHOLARSHI, AUXILIARY_, HOSPITALS, INDEPENDEN, OTHEREXP, TOTASSETS, TOTLIABILITY, NoNEXPPERMRESASSETS, EXPENDABLE, UNRNETASSETS, TOTALREV, TUITFEES, CURRDEBT, LONGTERMDEBT, TOTALNETASSETS from Table3 where IUser_ID = '" + TextBoxIUser_ID.Text + "'", con4);
SqlDataReader dr4 = scmd4.ExecuteReader();
if (dr4.Read())
{
TextBoxLYTROA.Text = dr4["TOTAL_REVE"].ToString();
TextBoxLYInstr.Text = dr4["INSTRUCTIO"].ToString();
TextBoxLYRes.Text = dr4["RESEARCH"].ToString();
TextBoxLYPubS.Text = dr4["PUBLIC_SER"].ToString();
TextBoxLYAcad.Text = dr4["ACADEMIC_S"].ToString();
TextBoxLYStudS.Text = dr4["STUDENT_SE"].ToString();
TextBoxLYInstiS.Text = dr4["INSTITUTIO"].ToString();
TextBoxLYOperM.Text = dr4["PHYSICAL_P"].ToString();
TextBoxLYSFEDA.Text = dr4["SCHOLARSHI"].ToString();
TextBoxLYAuxE.Text = dr4["AUXILIARY_"].ToString();
TextBoxLYHosS.Text = dr4["HOSPITALS"].ToString();
TextBoxLYIndeO.Text = dr4["INDEPENDEN"].ToString();
TextBoxLYOED.Text = dr4["OTHEREXP"].ToString();
TextBoxLYTA.Text = dr4["TOTASSETS"].ToString();
TextBoxLYTL.Text = dr4["TOTLIABILITY"].ToString();
TextBoxLYNPRNA.Text = dr4["NoNEXPPERMRESASSETS"].ToString();
TextBoxLYETRNA.Text = dr4["EXPENDABLE"].ToString();
TextBoxLYTUNA.Text = dr4["UNRNETASSETS"].ToString();
TextBoxLYTR.Text = dr4["TOTALREV"].ToString();
TextBoxLYTFN.Text = dr4["TUITFEES"].ToString();
TextBoxLYCD.Text = dr4["CURRDEBT"].ToString();
TextBoxLYLTD.Text = dr4["LONGTERMDEBT"].ToString();
TextBoxLYTNA.Text = dr4["TOTALNETASSETS"].ToString();
}
con4.Close();
dr4.Close();
}
}