locked
Image download RRS feed

  • Question

  • hi i am shakil

    by light switch i can make image upload & can see the image.

    how can i download this image after uploading in my project

    please expain soon

    thank you

    Thursday, February 23, 2012 12:45 PM

Answers

All replies

  • see:

    Help Desk: An Advanced Visual Studio LightSwitch Application

      

            public void DownloadFile(string strFileName)
            {
                Dispatchers.Main.Invoke(() =>
                {
                    HtmlPage.Window.Navigate(new Uri(string.Format("{0}",
                        String.Format(@"DownloadFile.aspx?FileName={0}",
                        strFileName)), UriKind.Relative), "_new");
                });
            } 


    Make Them Ask: That's a LightSwitch App?

    http://LightSwitchHelpWebsite.com

    Thursday, February 23, 2012 1:31 PM
  • Hi Michael

    I need to allow users to download a photo that currently is displayed in my SL app using the Image Viewer control.

    Since your article at: http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/86/Help-Desk-An-Advanced-Visual-Studio-LightSwitch-Application.aspx

    I now cannot see where the folders you mention.

    Below is what I see. Please help me if possible. Thanks, Mark.


    Mark


    • Edited by ITPSB Thursday, June 18, 2015 5:50 AM
    Thursday, June 18, 2015 5:46 AM
  • Darn the problem is that my example is so old things may not work the same way :( Does my example still run? I haven't touched Silverlight in years I am afraid :(

    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book

    http://LightSwitchHelpWebsite.com

    Thursday, June 18, 2015 11:55 AM
  • You could use Web API to download a file.  It will work with the Silverlight and HTML clients.  I don't have a sample handy, and there is some setup involved, but you can find plenty of examples on the net.  Once you get used to Web API you will use it for all kinds of things that require "commanding" in LightSwitch.
    Friday, June 19, 2015 3:30 AM
  • Hi Michael

    Thanks for the update.

    I guessed that you'd be busy with other dev platforms but thanks for your assistance anyway.

    When I get something working I'll update this post.

    Best regards, Mark.


    Mark

    Friday, June 19, 2015 6:10 AM
  • Hi

    Thanks for the information.

    I'll follow up on it and update this post with a solution when I have it working.

    Best regards, Mark.


    Mark

    Friday, June 19, 2015 6:12 AM
  • Hi

    I found a simple solution.

    I use ComponentOne's Flexgrid control and with it comes a Print button.

    Printing the row containing the Image control allows the photo to be printed.

    So printing to OneNote or whatever effectively solves the problem.

    Thanks, Mark.


    Mark

    • Proposed as answer by ITPSB Friday, July 3, 2015 4:19 AM
    Friday, July 3, 2015 4:19 AM