Click here to Skip to main content
15,123,585 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: use dropdown list control Pin
sc steinhayse11-Nov-11 4:44
Membersc steinhayse11-Nov-11 4:44 
GeneralRe: use dropdown list control Pin
Not Active11-Nov-11 4:58
mentorNot Active11-Nov-11 4:58 
Questionsetting up start up page Pin
MalarGayu10-Nov-11 15:22
MemberMalarGayu10-Nov-11 15:22 
AnswerRe: setting up start up page Pin
Anuj Banka10-Nov-11 19:13
MemberAnuj Banka10-Nov-11 19:13 
AnswerRe: setting up start up page Pin
Dennis E White10-Nov-11 19:18
professionalDennis E White10-Nov-11 19:18 
GeneralRe: setting up start up page Pin
MalarGayu10-Nov-11 20:27
MemberMalarGayu10-Nov-11 20:27 
Questionclass Pin
byka10-Nov-11 3:42
Memberbyka10-Nov-11 3:42 
AnswerRe: class Pin
Morgs Morgan10-Nov-11 4:05
MemberMorgs Morgan10-Nov-11 4:05 
C#
//assuming your class name is called "Users"
List<Users> users = new List<Users>();
Users user = new Users();
user.UserId = 1;//assuming the id is of type "int"
user.Name = "Byka";//assuming this is indeed the user name
users.Add( user );//we are adding an instance of the User class

You can do this in a for/foreach loop if you are reading the users from the database. if that's the case, you can go
C#
List<Users> users = new List<Users>();
for(int i=0;i<length;i++)
{
   Users user = new Users();//creating a new instance of the user object/class on each iteration
   user.UserId = 1;//assuming the id is of type "int"
  user.Name = "Byka";//assuming this is indeed the user name
  users.Add( user );//we are adding an instance of the User class
}


Happy coding,
Morgs
AnswerRe: class Pin
Dennis E White10-Nov-11 5:39
professionalDennis E White10-Nov-11 5:39 
Questionboarders in grid view Pin
DhivyaThangavel9-Nov-11 23:18
MemberDhivyaThangavel9-Nov-11 23:18 
AnswerRe: boarders in grid view Pin
Richard MacCutchan9-Nov-11 23:24
mveRichard MacCutchan9-Nov-11 23:24 
AnswerRe: boarders in grid view Pin
Dennis E White10-Nov-11 5:37
professionalDennis E White10-Nov-11 5:37 
AnswerRe: boarders in grid view Pin
thatraja12-Nov-11 19:22
professionalthatraja12-Nov-11 19:22 
QuestionTab is not showing properly within update panel Pin
DhivyaThangavel9-Nov-11 23:16
MemberDhivyaThangavel9-Nov-11 23:16 
AnswerRe: Tab is not showing properly within update panel Pin
Richard MacCutchan9-Nov-11 23:23
mveRichard MacCutchan9-Nov-11 23:23 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 2:09
MemberDhivyaThangavel10-Nov-11 2:09 
GeneralRe: Tab is not showing properly within update panel Pin
Richard MacCutchan10-Nov-11 2:11
mveRichard MacCutchan10-Nov-11 2:11 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 2:32
MemberDhivyaThangavel10-Nov-11 2:32 
AnswerRe: Tab is not showing properly within update panel Pin
Dennis E White10-Nov-11 5:50
professionalDennis E White10-Nov-11 5:50 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 19:05
MemberDhivyaThangavel10-Nov-11 19:05 
GeneralRe: Tab is not showing properly within update panel Pin
Dennis E White10-Nov-11 19:14
professionalDennis E White10-Nov-11 19:14 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 19:48
MemberDhivyaThangavel10-Nov-11 19:48 
Question(500) Internal Server Error. Pin
benams9-Nov-11 0:03
Memberbenams9-Nov-11 0:03 
AnswerRe: (500) Internal Server Error. Pin
Dennis E White9-Nov-11 4:57
professionalDennis E White9-Nov-11 4:57 
AnswerRe: (500) Internal Server Error. Pin
R. Giskard Reventlov9-Nov-11 5:18
MemberR. Giskard Reventlov9-Nov-11 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.