Click here to Skip to main content
15,879,535 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: use dropdown list control Pin
sc steinhayse11-Nov-11 3:44
sc steinhayse11-Nov-11 3:44 
GeneralRe: use dropdown list control Pin
Not Active11-Nov-11 3:58
mentorNot Active11-Nov-11 3:58 
Questionsetting up start up page Pin
MalarGayu10-Nov-11 14:22
MalarGayu10-Nov-11 14:22 
AnswerRe: setting up start up page Pin
Anuj Banka10-Nov-11 18:13
Anuj Banka10-Nov-11 18:13 
AnswerRe: setting up start up page Pin
Dennis E White10-Nov-11 18:18
professionalDennis E White10-Nov-11 18:18 
GeneralRe: setting up start up page Pin
MalarGayu10-Nov-11 19:27
MalarGayu10-Nov-11 19:27 
Questionclass Pin
byka10-Nov-11 2:42
byka10-Nov-11 2:42 
AnswerRe: class Pin
Morgs Morgan10-Nov-11 3:05
Morgs Morgan10-Nov-11 3: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 4:39
professionalDennis E White10-Nov-11 4:39 
Questionboarders in grid view Pin
DhivyaThangavel9-Nov-11 22:18
DhivyaThangavel9-Nov-11 22:18 
AnswerRe: boarders in grid view Pin
Richard MacCutchan9-Nov-11 22:24
mveRichard MacCutchan9-Nov-11 22:24 
AnswerRe: boarders in grid view Pin
Dennis E White10-Nov-11 4:37
professionalDennis E White10-Nov-11 4:37 
AnswerRe: boarders in grid view Pin
thatraja12-Nov-11 18:22
professionalthatraja12-Nov-11 18:22 
QuestionTab is not showing properly within update panel Pin
DhivyaThangavel9-Nov-11 22:16
DhivyaThangavel9-Nov-11 22:16 
AnswerRe: Tab is not showing properly within update panel Pin
Richard MacCutchan9-Nov-11 22:23
mveRichard MacCutchan9-Nov-11 22:23 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 1:09
DhivyaThangavel10-Nov-11 1:09 
GeneralRe: Tab is not showing properly within update panel Pin
Richard MacCutchan10-Nov-11 1:11
mveRichard MacCutchan10-Nov-11 1:11 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 1:32
DhivyaThangavel10-Nov-11 1:32 
AnswerRe: Tab is not showing properly within update panel Pin
Dennis E White10-Nov-11 4:50
professionalDennis E White10-Nov-11 4:50 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 18:05
DhivyaThangavel10-Nov-11 18:05 
GeneralRe: Tab is not showing properly within update panel Pin
Dennis E White10-Nov-11 18:14
professionalDennis E White10-Nov-11 18:14 
GeneralRe: Tab is not showing properly within update panel Pin
DhivyaThangavel10-Nov-11 18:48
DhivyaThangavel10-Nov-11 18:48 
Question(500) Internal Server Error. Pin
benams8-Nov-11 23:03
benams8-Nov-11 23:03 
AnswerRe: (500) Internal Server Error. Pin
Dennis E White9-Nov-11 3:57
professionalDennis E White9-Nov-11 3:57 
AnswerRe: (500) Internal Server Error. Pin
R. Giskard Reventlov9-Nov-11 4:18
R. Giskard Reventlov9-Nov-11 4: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.