locked
make asp:literal a download link to files RRS feed

  • Question

  • User-93301134 posted

    Hello,

    I am really new to the asp:literal control and I want to use it as a download link to files that are saved in a folder named (uploads) in my project directory. I have searched for tutorials online and I really can't understand how to do it. Can you enlighten me on how to do it?

    Thursday, October 25, 2018 3:32 AM

All replies

  • User409696431 posted

    A literal is not a link.  It renders text on the page.  If you want a link, why don't you use a link?  It can be an HTML link or an asp.net hyperlink control.

    Thursday, October 25, 2018 3:52 AM
  • User839733648 posted

    Hi dimalupig_ph,

    Just as KathyW has said, asp:literal is always not used as link.

    The Literal Control is similar to the Label Control as they both are used to display static text on a web page.

    For more about Literal Control, you could refer to:

    Literal Web Server Control Overview

    How to: Add Literal Web Server Controls to a Web Forms Page

    If you want to use some control as download link, I suggest that you could use LinkButton Control.

    Best Regards,

    Jenifer

    Friday, October 26, 2018 8:41 AM