C# Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



C# Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML to XML
HTTP
IMAP
Encryption
MHT / HTML Email
MIME
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

List Blog Categories

Uses the Tortuga Movable Type API (.NET Component) to fetch the category list for a blog and iterate over the category IDs and names.

// Use the Blogger 1.0 API to get the Blog ID of the first blog.
Tortuga.Blogger1 b1 = new Tortuga.Blogger1();
b1.Login = "admin";
b1.Password = "myPassword";
b1.ServiceUrl = "http://www.something.com/blog/xmlrpc.php";
b1.GetUsersBlogs();
string blogId = b1.GetBlogId(0);

// Create an instance of the Movable Type class.
Tortuga.MovableType mt = new Tortuga.MovableType();
mt.Login = "admin";
mt.Password = "myPassword";
mt.ServiceUrl = "http://www.something.com/blog/xmlrpc.php";

// Fetch the category list for a specific blog
bool ok = mt.GetCategoryList(blogId);
if (!ok)
{
    MessageBox.Show("Failed to fetch category list!");
    return;
}

// We can now use the following properties/methods
// to get the categories we just fetched.
// NumCategories
// GetCatgoryName(long index)
// GetCatgoryId(long index)
// GetCategoryIdByName(string catName)

// Loop over the blog categories and add them to a list box.
listBox1.Items.Clear();
int i;
int numCats = mt.NumCategories;
for (i=0; i<numCats; i++)
{
    string catName = mt.GetCategoryName(i);
    string catId = mt.GetCategoryId(i);
    listBox1.Items.Add(catId + ": " + catName);
}

Important: The download for this example does not contain the Tortuga .NET Class Library (TortugaDN.dll) which can be downloaded from http://www.worldwideweb-x.com/TortugaDN.msi.

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.

Email Component · XML Parser