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

ASP.NET

 
QuestionPost back Pin
seemamltn4-May-07 10:06
seemamltn4-May-07 10:06 
AnswerRe: Post back Pin
kubben4-May-07 13:34
kubben4-May-07 13:34 
AnswerRe: Post back Pin
SABhatti4-May-07 16:36
SABhatti4-May-07 16:36 
QuestionText_changed event Pin
TheEagle4-May-07 9:59
TheEagle4-May-07 9:59 
AnswerRe: Text_changed event Pin
kubben4-May-07 13:36
kubben4-May-07 13:36 
GeneralRe: Text_changed event Pin
TheEagle4-May-07 16:31
TheEagle4-May-07 16:31 
GeneralRe: Text_changed event Pin
kubben5-May-07 1:13
kubben5-May-07 1:13 
GeneralRe: Text_changed event Pin
TheEagle5-May-07 1:54
TheEagle5-May-07 1:54 
GeneralRe: Text_changed event Pin
kubben5-May-07 2:05
kubben5-May-07 2:05 
AnswerRe: Text_changed event Pin
Sherin Iranimose8-May-07 1:04
Sherin Iranimose8-May-07 1:04 
QuestionPrinting query results loaded into datalist Pin
hutchison14-May-07 9:37
hutchison14-May-07 9:37 
QuestionButton click event Pin
seemamltn4-May-07 8:39
seemamltn4-May-07 8:39 
AnswerRe: Button click event Pin
Tarakeshwar Reddy4-May-07 9:01
professionalTarakeshwar Reddy4-May-07 9:01 
QuestionReading a Textbox into an array Pin
Ibuprofen4-May-07 8:10
Ibuprofen4-May-07 8:10 
AnswerRe: Reading a Textbox into an array Pin
Tarakeshwar Reddy4-May-07 8:15
professionalTarakeshwar Reddy4-May-07 8:15 
GeneralRe: Reading a Textbox into an array Pin
Ibuprofen4-May-07 8:17
Ibuprofen4-May-07 8:17 
GeneralRe: Reading a Textbox into an array Pin
Ibuprofen4-May-07 8:38
Ibuprofen4-May-07 8:38 
GeneralRe: Reading a Textbox into an array Pin
Tarakeshwar Reddy4-May-07 8:46
professionalTarakeshwar Reddy4-May-07 8:46 
GeneralRe: Reading a Textbox into an array Pin
Ibuprofen4-May-07 8:48
Ibuprofen4-May-07 8:48 
GeneralRe: Reading a Textbox into an array [modified] Pin
Tarakeshwar Reddy4-May-07 9:24
professionalTarakeshwar Reddy4-May-07 9:24 
Have a look at this article[^] on codeproject, it shows you how to create dynamic controls. This msdn[^] shows you how to add controls to a place holder.

In the click event of the button, split the filenames into an array, for every item in the array create a linkbutton with a click event and add it to the placeholder

ex: 
LinkButton link;
for(int i  = 0; i <= FileNames.Length-1 ; i++)
{
	link = new LinkButton();
	link.ID = "link"+i.ToString();
	link.Text = "http://www.yoursite.com/uploadedfile/"+ FileNames[i];
	link.Click += new EventHandler(link_Click);
	PlaceHolder1.Controls.Add(link);
}


Instead of the linkbutton you can also use the label control and set the text of the label control as Label1.Text = a href to pass the location to it.

This is just a sample code, just change it to how you need it. You will have to ensure that the controls get added back when a postback takes place.
Last modified: 16mins after originally posted --



GeneralRe: Reading a Textbox into an array Pin
Ibuprofen4-May-07 9:26
Ibuprofen4-May-07 9:26 
GeneralRe: Reading a Textbox into an array Pin
Ibuprofen4-May-07 9:30
Ibuprofen4-May-07 9:30 
GeneralRe: Reading a Textbox into an array Pin
Tarakeshwar Reddy4-May-07 9:40
professionalTarakeshwar Reddy4-May-07 9:40 
GeneralRe: Reading a Textbox into an array Pin
Ibuprofen4-May-07 9:42
Ibuprofen4-May-07 9:42 
GeneralRe: Reading a Textbox into an array Pin
Tarakeshwar Reddy4-May-07 9:48
professionalTarakeshwar Reddy4-May-07 9:48 

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.