This is a migrated thread and some comments may be shown as answers.

Radmasktextbox problem

1 Answer 65 Views
Input
This is a migrated thread and some comments may be shown as answers.
sudheer
Top achievements
Rank 2
sudheer asked on 13 Jan 2009, 10:56 AM
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
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
 
 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 14 Jan 2009, 04:01 PM
Hi sudheer,

Are you using one or two RadMaskedTextBoxes to implement your scenario? If it is one RadMaskedTextBox, I suggest that you change its Mask accordingly.
Find the attached samepl and let me know if it works for you.

Best wishes,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Input
Asked by
sudheer
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Share this question
or