This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//newParentFolderId = the parentId you want to move the document to | |
//documentObject = the document you're moving to its new location. | |
documentObject.Move(newParentFolderId); | |
if (!autoFolder.EnableBatchProcessing) | |
{ | |
library.RefreshContent(); | |
documentObject.Publish(new User(0)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Application_BeginRequest(object sender, EventArgs e) | |
{ | |
//If upper case letters are found in the URL, redirect to lower case URL. | |
if (Regex.IsMatch(HttpContext.Current.Request.RawUrl.ToString(), @"[A-Z]") == true) | |
{ | |
if (Request.HttpMethod == "GET" && !(Request.RawUrl.Contains(".axd"))) | |
{ | |
string LowercaseURL = HttpContext.Current.Request.RawUrl.ToString().ToLower(); | |
Response.Clear(); | |
Response.Status = "301 Moved Permanently"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OpenPOP.POP3.POPClient client = new POPClient("pop.yourserver.co.uk", 110, "[email protected]", "password_goes_here", AuthenticationMethod.USERPASS); | |
if (client.Connected) { | |
int msgCount = client.GetMessageCount(); | |
/* Cycle through messages */ | |
for (int x = 0; x < msgCount; x++) | |
{ | |
OpenPOP.MIMEParser.Message msg = client.GetMessage(x, false); | |
NewerOlder