Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

when to use

  Asked By: Saidi    Date: Nov 22    Category: Sharepoint    Views: 989

can i know when we will use spsite site=new spsite("url");
and spsite site=spcontext.current.site



1 Answer Found

Answer #1    Answered By: Kamal Verma     Answered On: Nov 23

Both are same. SPContext.Current.Site return the site reference in which this code is running. and spsite site=new spsite("url"); return the site reference of the specified URL

see also: www.expertsupdates.com/.../sdk.aspx

Didn't find what you were looking for? Find more on when to use Or get search suggestion and latest updates.