Skip to main content

Microsoft Silverlight

Unanswered Question delete file created on serverRSS Feed

(0)

hazz
hazz

Member

Member

75 points

259 Posts

delete file created on server

 as per  http://tinyurl.com/mqspaf,

I need to delete, from Page.xaml.cs, the csv file just created.

I have many Silverlight projects/Reports/Pages which will each write a csv file to the same File Directory.

  1. The current client code cannot determine which file to fetch from the "FileDir" directory on the server.
  2. Until I figure out a better way to handle multiple requests from various Pages to save csv files into the same directory, I think deleting the one just created sounds like the easiest approach.

 

 

 

 

hazz

ken tucker
ken tucker

All-Star

All-Star

16276 points

2,479 Posts

Re: delete file created on server

I dont think it is a good idea to save the csv on the server it changes.  I would write the csv to the response.outputstream on an aspx page

 

http://msdn.microsoft.com/en-us/library/system.web.httpresponse.outputstream.aspx

egoZd
egoZd

Member

Member

326 points

125 Posts

Re: delete file created on server

When you generate the file on server , you can save a tag on client side , and when you want to delete please send this tag as a request parameter , then server can understand which file to delete ,Does this you want.

Something remember ,Something forgot!


www.douziwang.cn

(My Silverlight Blog Jet,Silverlight game ect.)

hazz
hazz

Member

Member

75 points

259 Posts

Re: delete file created on server

Thanks Ken. I like the idea of sending the file straight away instead of saving to server with associated problems that arise. (ie. deleting)

Do I

1.  utilize an existing aspx page in the silverlight web project or

2. create a new one or

3. utilize the same .aspx page that hosts the .xap file itself.

Sorry for my need for a little more clarity. 

Thanks,

hazz

hazz
hazz

Member

Member

75 points

259 Posts

Re: delete file created on server

Thank you for the idea.  How do I save a tag of the file on the client if it was created on the server?

hazz
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities