var siteCode = CultureSiteInfoProvider.GetSiteCultureCodes(SiteContext.CurrentSiteName)[0].ToString();
This is worked in kentico 8 but iam working in kentico 7.0.51 please tell me how to do this in kentico 7.0.51
Hello,
Please try string siteCode = CultureInfoProvider.GetSiteCultureCodes(CurrentSiteName)[0]; and let us know if you have any issues with this.
string siteCode = CultureInfoProvider.GetSiteCultureCodes(CurrentSiteName)[0];
Best Regards,
Sandro
Or you can try to get the CurrentSiteName from CMSContext. In Kentico 7 there was CMSContext which was broken up into several contexts for version 8.
Please, sign in to be able to submit a new answer.