I have 5 datas in my list.
MyList
So i want to know , how can i get selected Id's Row Number ?
var MyProductId= 135;
var SelectedDataRowNumber = context.SP_MyList.ToList()
.Where(s=>s.Id==MyProductId)
.FirstOrDefault();
As instance,
My List has 5 datas like below,
Id-Name
6,Computer
135,KeyBoard
68,Mouse
98,Telephone
213,Laptop,
MyProductId
is 135
so it matchs with Keyboard.It is row count number( index )must be "1" because 0 is Computer.
How can i get selected Id's row count(index) number ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…