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

ASP.NET

 
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 
GeneralHelp with DataSet.WriteXML Pin
Psycho-*Coder*-Extreme4-May-07 7:51
Psycho-*Coder*-Extreme4-May-07 7:51 
GeneralRe: Help with DataSet.WriteXML Pin
Tarakeshwar Reddy4-May-07 8:05
professionalTarakeshwar Reddy4-May-07 8:05 
GeneralRe: Help with DataSet.WriteXML Pin
Psycho-*Coder*-Extreme4-May-07 8:20
Psycho-*Coder*-Extreme4-May-07 8:20 
GeneralRe: Help with DataSet.WriteXML Pin
Tarakeshwar Reddy4-May-07 8:28
professionalTarakeshwar Reddy4-May-07 8:28 
QuestionASP.Net Page Design Pin
xbiplav4-May-07 6:26
xbiplav4-May-07 6:26 
QuestionDon't miss TechEd 2007, June 4-8 in Orlando Pin
JatinerS4-May-07 5:53
JatinerS4-May-07 5:53 
AnswerRe: Don't miss TechEd 2007, June 4-8 in Orlando Pin
Tarakeshwar Reddy4-May-07 6:20
professionalTarakeshwar Reddy4-May-07 6:20 
Questiondynamically created dropdownlist detecting problem Pin
amjad ali shah4-May-07 4:55
amjad ali shah4-May-07 4:55 
QuestionHelp Please Pin
yasso_1154-May-07 3:36
yasso_1154-May-07 3:36 
AnswerRe: Help Please Pin
Ibuprofen4-May-07 4:21
Ibuprofen4-May-07 4:21 
QuestionValidation of controls on webcontrols Pin
digsy_4-May-07 3:30
digsy_4-May-07 3:30 
Questioncount index char from string Pin
Imran Khan Pathan4-May-07 3:15
Imran Khan Pathan4-May-07 3:15 

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.