Questions about ASP. NET Path in the Examination System

Source: Internet
Author: User

This is the first time I raised a question in the form of a blog. The problem encountered this time was the use of server. mappath converts the address and then displays the image. This is nothing, but we get a relative address and an absolute address. The problem is as follows.

Front-end code

<Asp: Image id = "imgquestioncontent" runat = "server" visible = "false"/>

Background code

// Obtain the image path string ImagePath = server. mappath (("~ \ Pages \ questionimage \ ") + dtonequestion. Rows [0] [" questioncontent "]. tostring (). Trim (); imgquestioncontent. imageurl = ImagePath;

ImagePath obtained after debugging


HTML code


ImagePath

You don't need to reach out for answers here, but give questions after you fail to search for answers. If you have any questions, please contact us.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.