Hi
i have a radmasktextbox for tax .
while inserting i need to insert 10 numbers for tax in database . but while fetch and view mode i need to encrypt first 7 numbers and show only last three numbers.
i m able to encrypt but while showing in text textboxid.text is throwing NULL
Result should look like xxxxxxx123
The following code i used
i have a radmasktextbox for tax .
while inserting i need to insert 10 numbers for tax in database . but while fetch and view mode i need to encrypt first 7 numbers and show only last three numbers.
i m able to encrypt but while showing in text textboxid.text is throwing NULL
Result should look like xxxxxxx123
The following code i used
| private string MaskText(string strMasktext, int DisplayCount) |
| { |
| int temp = strMasktext.Length - DisplayCount; |
| string LastChar = strMasktext.Substring(temp, DisplayCount); |
| string MaskVal = string.Empty; |
| for (int l_intCnt = 0; l_intCnt < temp; l_intCnt++) |
| { |
| MaskValMaskVal = MaskVal + 0; |
| } |
| return MaskValMaskVal = MaskVal + LastChar; |
| } |
| string taxid = string.Empty; |
| txtmaskTaxid.Enabled = true; |
| taxid = MaskText(dsESIIDSearch.Tables[0].Rows[0]["TaxID"].ToString(), 3); |
| txtmaskTaxid.Text = taxid; |