Monday, 27 August 2012

Before & after items after split a string


Before split string


       string input = TextBox1.Text;
        int index = input.LastIndexOf("@");
               or-  int index = input.IndexOf("@");
        if (index > 0)
        input = input.Substring(0, index);
        resporse.write=input;



After split strings



string input = TextBox1.Text;
        response.write = input.Split('@').Last();

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...