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

ASP.NET

 
AnswerRe: Custom Login and Membership classes Pin
Not Active9-Jul-07 6:06
mentorNot Active9-Jul-07 6:06 
Questiongridview in asp.net 2.0. Pin
samerh9-Jul-07 5:10
samerh9-Jul-07 5:10 
AnswerRe: gridview in asp.net 2.0. Pin
Not Active9-Jul-07 5:23
mentorNot Active9-Jul-07 5:23 
GeneralRe: gridview in asp.net 2.0. Pin
samerh9-Jul-07 5:30
samerh9-Jul-07 5:30 
GeneralRe: gridview in asp.net 2.0. Pin
Not Active9-Jul-07 6:01
mentorNot Active9-Jul-07 6:01 
AnswerRe: gridview in asp.net 2.0. Pin
linpihong9-Jul-07 16:38
linpihong9-Jul-07 16:38 
GeneralRe: gridview in asp.net 2.0. Pin
samerh9-Jul-07 19:45
samerh9-Jul-07 19:45 
QuestionGenerate link buttons dynamically Pin
kjosh9-Jul-07 4:58
kjosh9-Jul-07 4:58 
Hi,

In my application I have one file upload control. When the user selectes a file to upload and when he clicks on Attach button I need to show him the file name of the file he selected to upload and also show the Remove link button after the file name. In this case I need to generate link button dynamically.

I wrote a code like the following:

protected void btnAttach_ServerClick(object sender, EventArgs e)

{

string strFileName = MyFile.PostedFile.FileName;

string c = System.IO.Path.GetFileName(strFileName);

listBoxAttachedFiles.Items.Add(c);

LinkButton b = new LinkButton();

b.Text = "Remove";

b.ID = "LB_" + b.Text;

b.Style.Add("display", "block");

listBoxLinks.Controls.Add(b);

//Panel1.Controls.Add(b);

}

With the above code it is showing only th file name in the listbox it is not showing the Remove button in the listboxlinks list box.

How to generate the link button and and write event when the remove is clicked i have to remove the corresponding file name from the other listbox.

Thanks in advance.

QuestionWeb Server for Multiple User Connections Pin
ollysmith9-Jul-07 4:53
ollysmith9-Jul-07 4:53 
AnswerRe: Web Server for Multiple User Connections Pin
Fred_Smith9-Jul-07 5:22
Fred_Smith9-Jul-07 5:22 
GeneralRe: Web Server for Multiple User Connections Pin
Not Active9-Jul-07 6:03
mentorNot Active9-Jul-07 6:03 
GeneralRe: Web Server for Multiple User Connections Pin
ollysmith9-Jul-07 12:24
ollysmith9-Jul-07 12:24 
QuestionConfiguration Error> allowDefinition='MachineToApplication' beyond application level?? Pin
Amr M. K.9-Jul-07 4:39
Amr M. K.9-Jul-07 4:39 
QuestionERROR: Cannot have multiple items selected in a DropDownList. Pin
Anand krishna9-Jul-07 3:39
Anand krishna9-Jul-07 3:39 
AnswerRe: ERROR: Cannot have multiple items selected in a DropDownList. Pin
Vasudevan Deepak Kumar9-Jul-07 3:48
Vasudevan Deepak Kumar9-Jul-07 3:48 
AnswerRe: ERROR: Cannot have multiple items selected in a DropDownList. Pin
Imran Khan Pathan9-Jul-07 4:06
Imran Khan Pathan9-Jul-07 4:06 
Questiongenerate an assembly from a resource file programatically Pin
Prajin9-Jul-07 2:54
Prajin9-Jul-07 2:54 
QuestionFormatting GridView Pin
Jay_se9-Jul-07 2:54
Jay_se9-Jul-07 2:54 
AnswerRe: Formatting GridView Pin
Not Active9-Jul-07 3:58
mentorNot Active9-Jul-07 3:58 
GeneralRe: Formatting GridView Pin
Jay_se9-Jul-07 4:30
Jay_se9-Jul-07 4:30 
GeneralRe: Formatting GridView Pin
Not Active9-Jul-07 5:10
mentorNot Active9-Jul-07 5:10 
GeneralRe: Formatting GridView Pin
Jay_se9-Jul-07 18:30
Jay_se9-Jul-07 18:30 
QuestionWeb.Config, DLLs and NUnit Pin
Malcolm Smart9-Jul-07 2:45
Malcolm Smart9-Jul-07 2:45 
AnswerRe: Web.Config, DLLs and NUnit Pin
Malcolm Smart9-Jul-07 3:43
Malcolm Smart9-Jul-07 3:43 
GeneralRe: Web.Config, DLLs and NUnit Pin
Kevin McFarlane9-Jul-07 11:51
Kevin McFarlane9-Jul-07 11:51 

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.