none
list template based url new.aspx opened in new tab and click on Close button,why it's not responding. RRS feed

  • Question

  • In Visual Webpart,add hyperlink propert in Ediotr toolpane like below.

    

    Then after i provided the code like below for hyperlink:

     hfCreateList = new HyperLink();
                hfCreateList.Text = "Click here to Create List";
                 hfCreateList.Attributes.Add("href", SPContext.Current.Site.Url + "/_layouts/15/new.aspx?CustomTemplate=ExpandCollapse%2Estp&FeatureId=%7B00bfea71%2Dde22%2D43b2%2Da848%2Dc05709900100%7D&ListTemplate=100&               hfCreateList.Attributes.Add("Target","_blank");

                hfCreateList.Attributes.Add("href", "linkurl");

     After that i clcick in the link 'Click here to Create List' i have a new tab opened with the above url.

    If i click on Cancel button in that window,It wont responded.

    Pls help why its not working new tab.

    Friday, September 13, 2019 2:24 PM

All replies

  • Hi ,

    Below function is cancel logic of new.aspx.

    As you see, the cancel works for SharePoint Modaldialog or back to previous page, as you open this page in a new tag, so nothing will change.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, September 16, 2019 2:28 AM