Table of Contents
AddRoleToModule

Description: Grants 'EDIT' and 'DEPLOY' permissions for a specific role to a module.

Signature
public static void AddRoleToModule(int portalId, int moduleid, int roleid)
Example
AddRoleToModule(portalId, moduleid, roleid)
AppendFileModifiedDate

Description: Appends a version number based on the file's last modified date to a relative path. Useful for cache-busting CSS and JS files.

Signature
public static string AppendFileModifiedDate(string relPath, string paramname = "v", bool useCache = true)
Example
AppendFileModifiedDate(relPath, paramname, useCache)
BackUpNewFileName

Description: Generates a new backup file name, based on the date and time. (May not be unique) Generates a new backup file name in a structured backup directory, based on the current date and time.

Signature
public static string BackUpNewFileName(string backupRootFolder, string moduleName, string fileAppendix = "BackUp.xml")
Example
BackUpNewFileName(backupRootFolder, moduleName, fileAppendix)
ClearAllCache

Description: Clears the entire DNN cache.

Signature
public static void ClearAllCache()
Example
ClearAllCache()
ClearOldTempStorage

Description: Deletes all expired items from the temporary storage table.

Signature
public static void ClearOldTempStorage()
Example
ClearOldTempStorage()
ClearPortalCache

Description: Clears the cache for a specific portal.

Signature
public static void ClearPortalCache()
Example
ClearPortalCache()
Signature
public static void ClearPortalCache(int portalId)
Example
ClearPortalCache(portalId)
ClearTempDB

Description: Deletes all data from the 'DNNrocketTemp' table.

Signature
public static void ClearTempDB()
Example
ClearTempDB()
ClearThumbnailLock

Description: Clears file locks on thumbnail images by disposing of them from the cache.

Signature
public static void ClearThumbnailLock()
Example
ClearThumbnailLock()
CloneModule

Description: Clones a module from one tab to another.

Signature
public static void CloneModule(int moduleid, int fromTabId, int toTabId)
Example
CloneModule(moduleid, fromTabId, toTabId)
ConvertObjectToXMLString

Description: Convert Object to XML. Exmaple: var xmlString = ConvertObjectToXMLString(p); XElement xElement = XElement.Parse(xmlString); Serializes an object into an XML string.

Signature
public static string ConvertObjectToXMLString(object classObject)
Example
ConvertObjectToXMLString(classObject)
ConvertTimeToDouble

Description: Converts a time string (e.g., 'HH:mm:ss') into a double representation of hours.

Signature
public static double ConvertTimeToDouble(string timeString)
Example
ConvertTimeToDouble(timeString)
CreateDefaultRocketRoles

Description: Creates the default set of DNNrocket roles (Collaborator, Editor, Manager, etc.) for a given portal.

Signature
public static void CreateDefaultRocketRoles(int portalId)
Example
CreateDefaultRocketRoles(portalId)
CreateFolder

Description: Creates a folder using the DNN FolderManager to work around potential medium trust issues.

Signature
public static void CreateFolder(string fullfolderPath)
Example
CreateFolder(fullfolderPath)
CreateRole

Description: Creates a new security role in a portal if it does not already exist.

Signature
public static void CreateRole(int portalId, string roleName, string description = "", float serviceFee = 0, int billingPeriod = 0, string billingFrequency = "M", float trialFee = 0, int trialPeriod = 0, string trialFrequency = "N", bool isPublic = false, bool isAuto = false)
Example
CreateRole(portalId, roleName, description, serviceFee, billingPeriod, billingFrequency, trialFee, trialPeriod, trialFrequency, isPublic, isAuto)
Decrypt

Description: Decrypts a string using the portal's GUID as the default passkey.

Signature
public static String Decrypt(String value, String passkey = "")
Example
Decrypt(value, passkey)
DefaultRoleExist

Description: Checks if the default 'Collaborator' role exists for a given portal.

Signature
public static bool DefaultRoleExist(int portalId)
Example
DefaultRoleExist(portalId)
DeleteCookieValue

Description: Deletes a cookie by setting its expiration date to the past.

Signature
public static void DeleteCookieValue(string name)
Example
DeleteCookieValue(name)
DeleteFileIfOlderThan

Description: Deletes a single file if it is older than a specified date.

Signature
public static void DeleteFileIfOlderThan(string path, DateTime date)
Example
DeleteFileIfOlderThan(path, date)
DeleteOldFiles

Description: Deletes files in a folder that are older than a specified number of days.

Signature
public static void DeleteOldFiles(string folderPath, uint maximumAgeInDays, params string[] filesToExclude)
Example
DeleteOldFiles(folderPath, maximumAgeInDays, filesToExclude)
DeleteSearchDocument

Description: Deletes a document from the DNN search index.

Signature
public static void DeleteSearchDocument(int portalId, string queryString)
Example
DeleteSearchDocument(portalId, queryString)
DeleteTempStorage

Description: Deletes an item from temporary storage by its key.

Signature
public static void DeleteTempStorage(string key)
Example
DeleteTempStorage(key)
DependanciesList

Description: Gets a list of dependency records for an app theme, processing URL tokens.

Signature
public static List<SimplisityRecord> DependanciesList(string moduleRef, AppThemeBase appTheme, string domainUrl, string appThemeSystemFolder)
Example
DependanciesList(moduleRef, appTheme, domainUrl, appThemeSystemFolder)
Email

Description: Gets the email address of the specified portal or the current portal.

Signature
public static string Email(int portalId = -1)
Example
Email(portalId)
Encrypt

Description: Encrypts a string using the portal's GUID as the default passkey.

Signature
public static String Encrypt(String value, String passkey = "")
Example
Encrypt(value, passkey)
EncryptFileName

Description: Encrypts a file name and replaces any invalid file name characters.

Signature
public static string EncryptFileName(string encryptkey, string fileName)
Example
EncryptFileName(encryptkey, fileName)
EventProviderAfter

Description: Executes the 'AfterEvent' method on all active event providers for a system.

Signature
public static Dictionary<string, object> EventProviderAfter(string paramCmd, SystemLimpet systemData, SimplisityInfo postInfo, SimplisityInfo paramInfo, string editlang)
Example
EventProviderAfter(paramCmd, systemData, postInfo, paramInfo, editlang)
EventProviderBefore

Description: Executes the 'BeforeEvent' method on all active event providers for a system.

Signature
public static Dictionary<string, object> EventProviderBefore(string paramCmd, SystemLimpet systemData, SimplisityInfo postInfo, SimplisityInfo paramInfo, string editlang)
Example
EventProviderBefore(paramCmd, systemData, postInfo, paramInfo, editlang)
ExecSqlXmlJson
Signature
public static string ExecSqlXmlJson(string sqlCmd)
Example
ExecSqlXmlJson(sqlCmd)
ExtractZipFolder

Description: Extracts a zip archive to a specified folder.

Signature
public static void ExtractZipFolder(string zipFileMapPath, string outFolderMapPath, bool overwrite)
Example
ExtractZipFolder(zipFileMapPath, outFolderMapPath, overwrite)
ForceDocDownload

Description: Forces a file to be downloaded by the browser.

Signature
public static void ForceDocDownload(string docFilePath, string fileName, HttpResponse response)
Example
ForceDocDownload(docFilePath, fileName, response)
ForceStringDownload

Description: Forces a string of data to be downloaded by the browser as a file.

Signature
public static void ForceStringDownload(HttpResponse response, string fileName, string fileData)
Example
ForceStringDownload(response, fileName, fileData)
GetAllCultureCodeList

Description: Gets a list of SimplisityInfo objects representing all available .NET cultures, including display name, code, and a flag image URL.

Signature
public static List<SimplisityInfo> GetAllCultureCodeList()
Example
GetAllCultureCodeList()
GetAllCultureCodeNameList

Description: Gets a dictionary of all culture codes and their display names available in the .NET framework.

Signature
public static Dictionary<string, string> GetAllCultureCodeNameList()
Example
GetAllCultureCodeNameList()
GetAllModulesInPortal

Description: Gets a list of all non-deleted module IDs in a portal.

Signature
public static List<int> GetAllModulesInPortal(int portalId)
Example
GetAllModulesInPortal(portalId)
GetAllModulesOnPage

Description: Gets a list of all non-deleted module IDs on a specific page (tab).

Signature
public static List<int> GetAllModulesOnPage(int tabId)
Example
GetAllModulesOnPage(tabId)
GetCache

Description: Gets an object from the DNN cache.

Signature
public static object GetCache(string cacheKey)
Example
GetCache(cacheKey)
GetCookieValue

Description: Gets the value of a cookie by its name.

Signature
public static string GetCookieValue(string name)
Example
GetCookieValue(name)
GetCountryCode

Description: Extracts the country code part from a full culture code.

Signature
public static string GetCountryCode(string cultureCode)
Example
GetCountryCode(cultureCode)
GetCountryCodeList

Description: Gets a dictionary of all country codes and their names for a given portal.

Signature
public static Dictionary<String, String> GetCountryCodeList(int portalId = -1)
Example
GetCountryCodeList(portalId)
GetCountryName

Description: Gets the name of a country from its country code.

Signature
public static string GetCountryName(string countryCode, int portalId = -1)
Example
GetCountryName(countryCode, portalId)
GetCultureCodeList

Description: Gets a list of enabled culture codes for a portal.

Signature
public static List<string> GetCultureCodeList(int portalId = -1)
Example
GetCultureCodeList(portalId)
GetCultureCodeName

Description: Gets the display name for a given culture code.

Signature
public static string GetCultureCodeName(string cultureCode)
Example
GetCultureCodeName(cultureCode)
GetCultureCodeNameList

Description: Gets a dictionary of enabled culture codes and their native names for a portal.

Signature
public static Dictionary<string, string> GetCultureCodeNameList(int portalId = -1)
Example
GetCultureCodeNameList(portalId)
GetCurrencyList

Description: Gets a dictionary of available currencies for a portal from the 'Currency' DNN list.

Signature
public static Dictionary<string, string> GetCurrencyList(int portalId = -1)
Example
GetCurrencyList(portalId)
GetCurrentCountryCode

Description: Gets the country code part (e.g., 'US') from the current culture.

Signature
public static string GetCurrentCountryCode()
Example
GetCurrentCountryCode()
GetCurrentCulture

Description: Gets the name of the current thread's culture.

Signature
public static string GetCurrentCulture()
Example
GetCurrentCulture()
GetCurrentLanguageCode

Description: Gets the language code part (e.g., 'en') from the current culture.

Signature
public static string GetCurrentLanguageCode()
Example
GetCurrentLanguageCode()
GetDataResponseAsString

Description: Fetches the content of a URL as a string. Can optionally pass data in the request header.

Signature
public static string GetDataResponseAsString(string dataurl, string headerFieldId = "", string headerFieldData = "")
Example
GetDataResponseAsString(dataurl, headerFieldId, headerFieldData)
GetDomainFromUrl
Signature
public static string GetDomainFromUrl(string url)
Example
GetDomainFromUrl(url)
GetEditCulture

Description: Gets the current editing culture from the URL parameter 'editlang' or the 'simplisity_editlanguage' cookie.

Signature
public static string GetEditCulture()
Example
GetEditCulture()
GetEntityTypeCode

Description: Gets the entity type code from an interface's info, defaulting to the uppercase interface key if not specified.

Signature
public static string GetEntityTypeCode(SimplisityInfo interfaceInfo)
Example
GetEntityTypeCode(interfaceInfo)
GetFiles

Description: Gets a list of FileInfo objects for all files in a specified folder.

Signature
public static List<System.IO.FileInfo> GetFiles(string FolderMapPath)
Example
GetFiles(FolderMapPath)
GetLanguageCode

Description: Extracts the language code part from a full culture code.

Signature
public static string GetLanguageCode(string cultureCode)
Example
GetLanguageCode(cultureCode)
GetLibraryVersion

Description: Gets the version string of an installed DNN library package.

Signature
public static string GetLibraryVersion(string packageName)
Example
GetLibraryVersion(packageName)
GetLocalizedString

Description: Gets a localized string from a resource file.

Signature
public static string GetLocalizedString(string Key, string resourceFileRoot, string lang)
Example
GetLocalizedString(Key, resourceFileRoot, lang)
GetModList

Description: Gets a list of ModuleBase objects for all modules in a portal.

Signature
public static List<ModuleBase> GetModList(int portalId, bool includeDeleted = false)
Example
GetModList(portalId, includeDeleted)
GetModuleInterfaceKey

Description: Use the module name as DNNrocket interface key. Gets the DNNrocket interface key associated with a module, derived from its module name (e.g., 'systemkey_interfacekey').

Signature
public static string GetModuleInterfaceKey(int moduleId, int tabId)
Example
GetModuleInterfaceKey(moduleId, tabId)
GetModuleSystemInfo

Description: Gets the system information for a module, caching the result.

Signature
public static SimplisityInfo GetModuleSystemInfo(string systemkey, int moduleId, bool loadSystemXml = true)
Example
GetModuleSystemInfo(systemkey, moduleId, loadSystemXml)
GetModuleSystemKey

Description: Use the First DNN Module definition as the DNNrocket systemkey Gets the DNNrocket system key associated with a module, derived from its module name (e.g., 'systemkey_interfacekey').

Signature
public static string GetModuleSystemKey(int moduleId, int tabId)
Example
GetModuleSystemKey(moduleId, tabId)
GetModuleTabId

Description: Gets the Tab ID for a module by its unique GUID.

Signature
public static int GetModuleTabId(Guid uniqueId)
Example
GetModuleTabId(uniqueId)
GetModuleVersion

Description: Gets the version string of a DNN module.

Signature
public static string GetModuleVersion(int moduleId)
Example
GetModuleVersion(moduleId)
GetPortalContentRecByRefId

Description: Gets a portal-level content record by its reference ID, using caching.

Signature
public static SimplisityRecord GetPortalContentRecByRefId(int portalId, string systemKey, string tableName)
Example
GetPortalContentRecByRefId(portalId, systemKey, tableName)
GetPortalLanguageList

Description: Gets a list of unique two-letter language codes (e.g., 'en', 'fr') enabled for a portal.

Signature
public static List<string> GetPortalLanguageList(int portalId = -1)
Example
GetPortalLanguageList(portalId)
GetProviderReturn

Description: Executes a command on an API provider (APInterface) and returns the result.

Signature
public static Dictionary<string, object> GetProviderReturn(string paramCmd, SimplisityInfo systemInfo, RocketInterface rocketInterface, SimplisityInfo postInfo, SimplisityInfo paramInfo, string templateRelPath, string editlang)
Example
GetProviderReturn(paramCmd, systemInfo, rocketInterface, postInfo, paramInfo, templateRelPath, editlang)
GetQueryKeys

Description: Gets a dictionary of configured query parameter keys and their associated data for a portal.

Signature
public static Dictionary<string, QueryParamsData> GetQueryKeys(int portalId)
Example
GetQueryKeys(portalId)
GetRegionList

Description: Gets a dictionary of regions for a given country code from a DNN list.

Signature
public static Dictionary<string, string> GetRegionList(string countrycode, string dnnlistname = "Region")
Example
GetRegionList(countrycode, dnnlistname)
GetRegionName

Description: Gets the name of a region from a combined country and region code key.

Signature
public static string GetRegionName(string countryRegionCodeKey, string dnnlistname = "Region")
Example
GetRegionName(countryRegionCodeKey, dnnlistname)
GetResourceData

Description: Gets a dictionary of all resource values (Text, Help, etc.) for a given resource key.

Signature
public static Dictionary<String, String> GetResourceData(String resourcePath, String resourceKey, String lang = "")
Example
GetResourceData(resourcePath, resourceKey, lang)
GetResourceFileMapPath

Description: Gets the full physical map path for a resource file.

Signature
public static string GetResourceFileMapPath(String resourcePath, String resourceFileName, String cultureCode = "")
Example
GetResourceFileMapPath(resourcePath, resourceFileName, cultureCode)
GetResourceFileRelPath

Description: Constructs the relative path to a resource file based on path, filename, and culture code.

Signature
public static string GetResourceFileRelPath(String resourcePath, String resourceFileName, String cultureCode = "")
Example
GetResourceFileRelPath(resourcePath, resourceFileName, cultureCode)
GetResourceString

Description: Gets a specific value from a resource file based on the key and extension.

Signature
public static String GetResourceString(String resourcePath, String resourceKey, String resourceExt = "Text", String lang = "")
Example
GetResourceString(resourcePath, resourceKey, resourceExt, lang)
GetRoleByName

Description: Gets a RoleInfo object for a role by its name.

Signature
public static RoleInfo GetRoleByName(int portalId, string roleName)
Example
GetRoleByName(portalId, roleName)
GetSystemByName

Description: Gets a system's SimplisityInfo data by its system key.

Signature
public static SimplisityInfo GetSystemByName(string systemkey)
Example
GetSystemByName(systemkey)
GetTabInfo

Description: Gets a TabInfo object for a given tab ID and portal ID.

Signature
public static TabInfo GetTabInfo(int portalid, int tabid, bool ignoreCache = false)
Example
GetTabInfo(portalid, tabid, ignoreCache)
GetTabInfoRecord
Signature
public static SimplisityRecord GetTabInfoRecord(int portalId,int tabid, bool ignoreCache = false)
Example
GetTabInfoRecord(portalId, tabid, ignoreCache)
GetTabList

Description: Gets a list of all tabs in a portal as SimplisityRecord objects.

Signature
public static List<SimplisityRecord> GetTabList(int portalId)
Example
GetTabList(portalId)
GetTabModuleTitles
Signature
public static Dictionary<int,string> GetTabModuleTitles(int tabid, bool getDeleted = false)
Example
GetTabModuleTitles(tabid, getDeleted)
GetTempRecordStorage

Description: Retrieves a SimplisityRecord object from temporary storage.

Signature
public static SimplisityRecord GetTempRecordStorage(string key, bool deleteAfterRead = false)
Example
GetTempRecordStorage(key, deleteAfterRead)
GetTempStorage

Description: Retrieves a SimplisityInfo object from temporary storage.

Signature
public static SimplisityInfo GetTempStorage(string key, bool deleteAfterRead = false)
Example
GetTempStorage(key, deleteAfterRead)
GetTreeTabList

Description: Gets a dictionary of tabs in a hierarchical (tree) structure, suitable for a dropdown list.

Signature
public static Dictionary<int, string> GetTreeTabList(bool showAllTabs = false)
Example
GetTreeTabList(showAllTabs)
GetTreeTabListOnTabId

Description: Gets a dictionary of tabs in a hierarchical structure, where the key is the TabId.

Signature
public static Dictionary<int, string> GetTreeTabListOnTabId(bool showAllTabs = false)
Example
GetTreeTabListOnTabId(showAllTabs)
GetUniqueFileName

Description: Generates a unique file name for a given folder by appending an index if the file already exists.

Signature
public static string GetUniqueFileName(string fileName, string folderMapPath, int idx = 1, string originalFileName = "")
Example
GetUniqueFileName(fileName, folderMapPath, idx, originalFileName)
Handle404Exception

Description: Handles a 404 Not Found error by redirecting to the portal's defined 404 page or by returning a standard 404 response.

Signature
public static void Handle404Exception(HttpResponse response, PortalSettings portalSetting)
Example
Handle404Exception(response, portalSetting)
HtmlDecode

Description: Decodes an HTML-encoded string.

Signature
public static string HtmlDecode(String htmlString)
Example
HtmlDecode(htmlString)
HtmlEncode

Description: Encodes a plain text string into an HTML-safe string.

Signature
public static string HtmlEncode(String planStr)
Example
HtmlEncode(planStr)
HtmlOf

Description: Decodes an HTML-encoded string.

Signature
public static string HtmlOf(String htmlString)
Example
HtmlOf(htmlString)
ImportWebsite

Description: Initiates a DNN website import process from a given package file.

Signature
public static ExportImportJob ImportWebsite(int portalId, string importDataMapPath)
Example
ImportWebsite(portalId, importDataMapPath)
InjectDependacies

Description: Injects CSS and JS dependencies into a WebForms page.

Signature
public static void InjectDependacies(string moduleRef, Page page, AppThemeBase appTheme, bool ecoMode, string skinSrc, string domainUrl, string appThemeSystemFolder)
Example
InjectDependacies(moduleRef, page, appTheme, ecoMode, skinSrc, domainUrl, appThemeSystemFolder)
Signature
public static void InjectDependacies(string moduleRef, Page page, AppThemeBase appTheme, bool ecoMode, string skinSrc, string domainUrl, string appThemeSystemFolder, string displayTemplate)
Example
InjectDependacies(moduleRef, page, appTheme, ecoMode, skinSrc, domainUrl, appThemeSystemFolder, displayTemplate)
InjectDependencies

Description: Gets a cached list of Dependency objects to be injected into a page.

Signature
public static List<Dependency> InjectDependencies(string moduleRef, AppThemeBase appTheme, bool ecoMode, string skinSrc, string domainUrl, string appThemeSystemFolder)
Example
InjectDependencies(moduleRef, appTheme, ecoMode, skinSrc, domainUrl, appThemeSystemFolder)
IsMobile

Description: Determines if the current request is from a mobile device.

Signature
public static bool IsMobile()
Example
IsMobile()
IsModuleDeleted

Description: Checks if a module is marked as deleted by its ID.

Signature
public static bool IsModuleDeleted(int moduleId)
Example
IsModuleDeleted(moduleId)
MapPath

Description: Converts a relative web path to a physical file system path.

Signature
public static string MapPath(string relpath)
Example
MapPath(relpath)
MapPathReverse

Description: Converts a physical file system path back to a relative web path.

Signature
public static string MapPathReverse(string fullMapPath)
Example
MapPathReverse(fullMapPath)
ModuleExists

Description: Checks if a module exists on a specific tab.

Signature
public static bool ModuleExists(int tabid, int moduleid)
Example
ModuleExists(tabid, moduleid)
ModuleIsDeleted

Description: Checks if a module is marked as deleted.

Signature
public static bool ModuleIsDeleted(int tabid, int moduleid)
Example
ModuleIsDeleted(tabid, moduleid)
NavigateURL

Description: A wrapper for the DNN Globals.NavigateURL method to generate URLs for pages.

Signature
public static string NavigateURL()
Example
NavigateURL()
Signature
public static string NavigateURL(int tabId)
Example
NavigateURL(tabId)
Signature
public static string NavigateURL(int tabId, string[] param)
Example
NavigateURL(tabId, param)
Signature
public static string NavigateURL(int tabId, Dictionary<string, string> dictParams)
Example
NavigateURL(tabId, dictParams)
Signature
public static string NavigateURL(int tabId, Dictionary<string,string> dictParams, string seoname)
Example
NavigateURL(tabId, dictParams, seoname)
Signature
public static string NavigateURL(int tabId, string cultureCode, string[] param)
Example
NavigateURL(tabId, cultureCode, param)
Signature
public static string NavigateURL(int tabId, string controlKey, string cultureCode, string[] param)
Example
NavigateURL(tabId, controlKey, cultureCode, param)
Signature
public static string NavigateURL(int tabId, PortalSettings portalSettings, string controlKey, string cultureCode, string[] param)
Example
NavigateURL(tabId, portalSettings, controlKey, cultureCode, param)
Signature
public static string NavigateURL(int tabId, bool isSuperTab, PortalSettings portalSettings, string controlKey, string cultureCode, string[] param)
Example
NavigateURL(tabId, isSuperTab, portalSettings, controlKey, cultureCode, param)
ParseQueryString

Description: Gets a query parameter from a URL string. This function parses the URL string to get the parameter. it assumes friendly URL format first and the uses HttpUtility.ParseQueryString(url.Query). Because friendly format may have a page the same name as a key, be careful with the name of query keys. Parses a URL to get a specific query parameter value, checking both friendly URL format and standard query string.

Signature
public static string ParseQueryString(string key, string requesturl)
Example
ParseQueryString(key, requesturl)
ProtectEmail

Description: Obfuscates an email address in HTML to protect it from scrapers.

Signature
public static string ProtectEmail(this string email, string subject = "", string visibleText = "")
Example
ProtectEmail(email, subject, visibleText)
RecycleApplicationPool

Description: Recycles a web site Application Pool (including the current web site). Requires to reference Microsoft.Web.Administration and System.Web.Hosting. IMPORTANT: The IIS user requires extended permissions to recycle application pool(s). Recycles the application pool by 'touching' the web.config file.

Signature
public static bool RecycleApplicationPool(string siteName = null)
Example
RecycleApplicationPool(siteName)
RemoveCache

Description: Removes an object from the DNN cache.

Signature
public static void RemoveCache(string cacheKey)
Example
RemoveCache(cacheKey)
RemoveRoleToModule

Description: Removes permissions for a specific role from a module.

Signature
public static void RemoveRoleToModule(int portalId, int moduleid, int roleid)
Example
RemoveRoleToModule(portalId, moduleid, roleid)
RenderDocumentSelect

Description: Renders a document selection interface using a specified Razor template.

Signature
public static string RenderDocumentSelect(ModuleParams moduleParams, bool selectsingle = true, bool autoreturn = false)
Example
RenderDocumentSelect(moduleParams, selectsingle, autoreturn)
Signature
public static string RenderDocumentSelect(string systemkey, string documentFolderRel, bool selectsingle = true, bool autoreturn = false)
Example
RenderDocumentSelect(systemkey, documentFolderRel, selectsingle, autoreturn)
RenderImageSelect

Description: Render the image select template Renders an image selection interface using a specified Razor template.

Signature
public static string RenderImageSelect(string systemkey, string imageFolderRel, bool selectsingle = true, bool autoreturn = false)
Example
RenderImageSelect(systemkey, imageFolderRel, selectsingle, autoreturn)
RequestParam

Description: Gets a request parameter from the form or query string.

Signature
public static string RequestParam(HttpContextBase context, string paramName)
Example
RequestParam(context, paramName)
Signature
public static string RequestParam(HttpContextWrapper context, string paramName)
Example
RequestParam(context, paramName)
Signature
public static string RequestParam(HttpContext context, string paramName)
Example
RequestParam(context, paramName)
RequestQueryStringParam

Description: Gets a request parameter from the query string.

Signature
public static string RequestQueryStringParam(HttpRequestBase Request, string paramName)
Example
RequestQueryStringParam(Request, paramName)
Signature
public static string RequestQueryStringParam(HttpContextWrapper context, string paramName)
Example
RequestQueryStringParam(context, paramName)
Signature
public static string RequestQueryStringParam(HttpRequest Request, string paramName)
Example
RequestQueryStringParam(Request, paramName)
Signature
public static string RequestQueryStringParam(HttpContext context, string paramName)
Example
RequestQueryStringParam(context, paramName)
ResxValues

Description: Extracts all key-value pairs from a .resx file that end with a specific key extension.

Signature
public static Dictionary<string, string> ResxValues(string resourceFileName, string cultureCode, string keyExtension)
Example
ResxValues(resourceFileName, cultureCode, keyExtension)
ReturnString

Description: Creates a dictionary for a standard API response, containing an HTML output string and an optional JSON object.

Signature
public static Dictionary<string, object> ReturnString(string strOut, object jsonOut = null)
Example
ReturnString(strOut, jsonOut)
SetCache

Description: Sets an object in the DNN cache with a specified expiration.

Signature
public static void SetCache(string cacheKey, object objObject)
Example
SetCache(cacheKey, objObject)
Signature
public static void SetCache(string cacheKey, object objObject, int keephours)
Example
SetCache(cacheKey, objObject, keephours)
SetCookieValue

Description: Sets a cookie with a specified name and value.

Signature
public static void SetCookieValue(string name, string value)
Example
SetCookieValue(name, value)
SetCurrentCulture

Description: Sets the current thread's culture and updates the 'language' and 'simplisity_language' cookies.

Signature
public static void SetCurrentCulture(string cultureCode)
Example
SetCurrentCulture(cultureCode)
Signature
public static void SetCurrentCulture()
Example
SetCurrentCulture()
SetEditCulture

Description: Sets the editing culture by storing it in a cookie.

Signature
public static string SetEditCulture(string editlang)
Example
SetEditCulture(editlang)
SetTempRecordStorage

Description: Saves a SimplisityRecord object to temporary database storage.

Signature
public static string SetTempRecordStorage(SimplisityRecord value, string key = "", int keephours = 24)
Example
SetTempRecordStorage(value, key, keephours)
SetTempStorage

Description: Saves a SimplisityInfo object to temporary database storage with an expiration.

Signature
public static string SetTempStorage(SimplisityInfo value, string key = "", int keephours = 24)
Example
SetTempStorage(value, key, keephours)
StartBackgroundThread

Description: Starts a new background thread.

Signature
public static void StartBackgroundThread(ThreadStart threadStart)
Example
StartBackgroundThread(threadStart)
SynchronizeModule

Description: Synchronizes the module content between cache and database. + Update ModifiedContentDate

Signature
public static void SynchronizeModule(int moduleId)
Example
SynchronizeModule(moduleId)
SystemThemeImgDirectoryMapPath

Description: Returns the physical map path to the system theme image directory.

Signature
public static string SystemThemeImgDirectoryMapPath()
Example
SystemThemeImgDirectoryMapPath()
SystemThemeImgDirectoryRel

Description: Returns the relative path to the system theme image directory.

Signature
public static string SystemThemeImgDirectoryRel()
Example
SystemThemeImgDirectoryRel()
Truncate

Description: Truncates text to a number of characters

Signature
public static string Truncate(this string text, int maxCharacters)
Example
Truncate(text, maxCharacters)
Signature
public static string Truncate(this string text, int maxCharacters, string trailingText)
Example
Truncate(text, maxCharacters, trailingText)
TruncateWords

Description: Truncates a string to a maximum number of characters, ensuring it doesn't cut off in the middle of a word.

Signature
public static string TruncateWords(this string text, int maxCharacters, string trailingText)
Example
TruncateWords(text, maxCharacters, trailingText)
UpdateFieldXpath

Description: Updates the XPath for a list of fields in a SimplisityRecord based on their type and name.

Signature
public static SimplisityRecord UpdateFieldXpath(SimplisityInfo postInfo, SimplisityRecord record, string listname)
Example
UpdateFieldXpath(postInfo, record, listname)
UpdateModuleTitle

Description: Updates the title of a module.

Signature
public static void UpdateModuleTitle(int tabid, int moduleid, string title)
Example
UpdateModuleTitle(tabid, moduleid, title)
UpdateSimplsityInfoFields

Description: Updates fields in a SimplisityInfo object from another SimplisityInfo object based on an XPath selector.

Signature
public static SimplisityInfo UpdateSimplsityInfoFields(SimplisityInfo newInfo, SimplisityInfo postInfo, string xpathListSelect)
Example
UpdateSimplsityInfoFields(newInfo, postInfo, xpathListSelect)
UpdateSimplsityRecordFields

Description: Updates fields in a SimplisityRecord object from a SimplisityInfo object based on an XPath selector.

Signature
public static SimplisityRecord UpdateSimplsityRecordFields(SimplisityRecord newRec, SimplisityInfo postInfo, string xpathListSelect)
Example
UpdateSimplsityRecordFields(newRec, postInfo, xpathListSelect)
UpdateSqlIndex

Description: Updates or creates a SQL index record in the DNNrocket database.

Signature
public static void UpdateSqlIndex(SimplisityRecord idx)
Example
UpdateSqlIndex(idx)
UrlFriendly

Description: Converts a string into a URL-friendly format.

Signature
public static string UrlFriendly(string textstring)
Example
UrlFriendly(textstring)
ValidCulture

Description: Checks if a given culture code is enabled for the current portal.

Signature
public static bool ValidCulture(string cultureCode)
Example
ValidCulture(cultureCode)
ZipFolder

Description: Creates a zip archive from a folder.

Signature
public static void ZipFolder(string folderMapPath, string zipFileMapPath)
Example
ZipFolder(folderMapPath, zipFileMapPath)