Click here to Skip to main content
15,898,374 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am having trouble finding out how to delete a file from a file service. I have made a project very similar to Silverlight 4 Drag and Drop File Manager[^]. Now I have added a delete button next to every file download hyperlink which should remove the file from the project by clicking on it.

The problem is that I have tried various codes I could find on the internet and sadly I have not managed to find anything that works. Can someone help me with this? Any idea would help, since I am very new to silverlight and I am stuck.
Posted
Updated 4-Sep-11 18:42pm
v2

1 solution

In SilverLight, therez a general methodology to add a control as:
C#
// Add the control to the visual tree.
    this.LayoutRoot.Children.Add(controlName);


In similar way, the control can be dynamically removed as:
C#
// Delete the exisiting control.
    this.LayoutRoot.Children.Remove(controlName);


For your problem, you can use this approach as the solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900