sharepoint site web part code snippet

2020-12-08T21:28:30.173+00:00

I am new to sharepoint web part. What I am trying to do is connect to a sharepoint list using code snippet in web part but it keeps bombing. I've used several different pieces of code so I will not include any. Please help.

Microsoft 365 and Office SharePoint For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Echo Du_MSFT 17,316 Reputation points
    2020-12-09T02:55:02.223+00:00

    Hi @Clark, Lorenzo:(Contractor - ComEd) ,

    By design, the Code Snippet webpart provides a simple way to visualize specific examples of code within a brief snippet. The purpose of this web part is to display code as text within a page.

    In other words, the Code Snippet webpart doesn't do anything - the code is not executed. It's only used to display code so you can use it to document programs and such.

    If you want to add a List hyperlink to Modern page, you can choose the Text webpart.

    46492-1.jpg

    -------------------------

    Please follow steps:

    Add the Text webpart >> click Hyperlink icon >> entry the List Title and the List link >> Save and Publish your page

    46386-2.jpg
    46442-3.png
    46387-4.png

    Thanks,
    Echo Du

    =============

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.