hi , iam using asp.net with c#.
in my login the user names are 0198, 0276,03....05
when the user logins then based on the first two letters digits 01,02,03
i have to display all departments in a dropdownlist
how to seprate this starting two letters when user login
can you give example which helps me
Loading
CrishPosted May 26, 2010, 10:27 AM
use below code for your solution
username.Substring(0,2).
Also check length of the string else you will get error when you don't have user name's string character more than 1.
Thanks
VikramPosted May 26, 2010, 9:53 AM
user following,
username.Substring(0, 2)