Click here to Skip to main content
15,902,299 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Developing a discussion forum for my website Pin
nainakarri25-Feb-09 5:47
nainakarri25-Feb-09 5:47 
QuestionCreating child controls dynamically at runtime on clicking linkbutton in repeater control Pin
nainakarri24-Feb-09 4:57
nainakarri24-Feb-09 4:57 
QuestionGeneric Data Access Object Pin
snouto24-Feb-09 3:07
snouto24-Feb-09 3:07 
AnswerRe: Generic Data Access Object Pin
Jon Rista24-Feb-09 6:17
Jon Rista24-Feb-09 6:17 
QuestionNeed Help Pin
learningman24-Feb-09 3:00
learningman24-Feb-09 3:00 
AnswerPlease read the forum guidelines Pin
leckey24-Feb-09 4:53
leckey24-Feb-09 4:53 
Questionproblem with usercontrol Pin
Deepak Nigam24-Feb-09 2:00
Deepak Nigam24-Feb-09 2:00 
AnswerRe: problem with usercontrol Pin
Greg Chelstowski24-Feb-09 2:49
Greg Chelstowski24-Feb-09 2:49 
What I think you're asking for is creating your py_user control dynamically, when certain conditions are met, and also, a specified number of times, which would be user-input defined.

I'm only guessing you'll be putting that number in a textbox somewhere on your page.

Either way, how you should be doing it, is:
private void CreatePyUser()
{
try
{
int pyNum = Convert.ToInt32(textBox1.Text); //assuming you put a number in this textbox,otherwise the try-catch statement goes straight to catch

for(int py_uNum=0; py_uNum<=pyNum; pu_uNum++)
{
py_user py_user1 = new py_user();
py_user1.ID = "py_user"+py_uNum.ToString(); // assuming you want to access this control later
this.Controls.Add(py_user1);

}

}
catch
{
Response.Write("Please put in a number in the given textbox.");
}

}

If that's not what you wanted, please try explaining what you need in a bit more detail.
And perhaps pass some of your own code, sometimes?

var question = (_2b || !(_2b));

GeneralRe: problem with usercontrol Pin
Deepak Nigam24-Feb-09 3:29
Deepak Nigam24-Feb-09 3:29 
GeneralRe: problem with usercontrol Pin
Greg Chelstowski24-Feb-09 3:55
Greg Chelstowski24-Feb-09 3:55 
QuestionProblem in Upadate panel,Details view, Dropdownlist Pin
Mr.Himansu24-Feb-09 1:57
Mr.Himansu24-Feb-09 1:57 
QuestionHandling Multiple Forms in ASP.NET Pin
_Sun24-Feb-09 1:51
_Sun24-Feb-09 1:51 
AnswerRe: Handling Multiple Forms in ASP.NET Pin
ToddHileHoffer24-Feb-09 8:47
ToddHileHoffer24-Feb-09 8:47 
GeneralRe: Handling Multiple Forms in ASP.NET Pin
_Sun24-Feb-09 18:05
_Sun24-Feb-09 18:05 
Questionwhich control is more faster repeater , data grid view, response.write etc Pin
Naveed72724-Feb-09 1:45
Naveed72724-Feb-09 1:45 
AnswerRe: which control is more faster repeater , data grid view, response.write etc Pin
Ennis Ray Lynch, Jr.24-Feb-09 4:57
Ennis Ray Lynch, Jr.24-Feb-09 4:57 
AnswerRe: which control is more faster repeater , data grid view, response.write etc Pin
ToddHileHoffer24-Feb-09 8:45
ToddHileHoffer24-Feb-09 8:45 
QuestionK means clustering in vb Pin
venkatadri reddy23-Feb-09 23:36
venkatadri reddy23-Feb-09 23:36 
QuestionClassic Asp Session not getting expire As per IIS setting timeout Pin
googlejumbo23-Feb-09 23:28
googlejumbo23-Feb-09 23:28 
QuestionPassing parameters to Javascript popup window Pin
pavanip23-Feb-09 22:53
pavanip23-Feb-09 22:53 
AnswerRe: Passing parameters to Javascript popup window Pin
Greg Chelstowski23-Feb-09 23:03
Greg Chelstowski23-Feb-09 23:03 
GeneralRe: Passing parameters to Javascript popup window Pin
pavanip23-Feb-09 23:13
pavanip23-Feb-09 23:13 
GeneralRe: Passing parameters to Javascript popup window Pin
Greg Chelstowski23-Feb-09 23:28
Greg Chelstowski23-Feb-09 23:28 
GeneralRe: Passing parameters to Javascript popup window Pin
pavanip24-Feb-09 0:35
pavanip24-Feb-09 0:35 
GeneralRe: Passing parameters to Javascript popup window Pin
Greg Chelstowski24-Feb-09 1:32
Greg Chelstowski24-Feb-09 1:32 

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.