How to get the current Site collection Url in SharePoint using JavaScript.

Advertisement
 In this Article I will explain how to get the current site collection url in sharepoint using java script

<script type="text/javascript">
var currentsiteurl = "<%= SPContext.Current.Site.Url %>";
</script>


Now we are getting the site collection in currentsiteurl variable.
We can call this variable in JavaScript based on our condition 
Advertisements
SHARE

Lakshmi Tulasi Jasti

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

1 comments: