Hey, i am having trobbels of getting the type the following object returns.
*************************************************************
MEWebMail.MailFolders oPOPFolders = new MEWebMail.MailFoldersClass();
object RS = oPOPFolders.GetFolders(gPostOffice, gUserName, Password, "\\");
**********************************************************
The problem is that the object RS Should contain a collection of folders
but what is the type of that object?
C# MailFolders Object
Thnx but it works partly
OK First of all thank u, I managed to get :
ADODB.Recordset
But i cant continue from there.
Do u have any example or farther details?
Here is my code and here i am stack :
************************************************************
{
MEWebMail.MailFolders oPOPFolders = new MEWebMail.MailFoldersClass();
ADODB.Recordset RS = (ADODB.Recordset)oPOPFolders.GetFolders(gPostOffice, gUserName, gPassword, "\\");
if (!RS.EOF)
{
Response.Write("<CENTER><TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=2>");
while (!RS.EOF)
{
Response.Write("<TR>\n<TD class=ME_StandardText><IMG SRC=\"");
Response.Write(GetFolderIcon(RS.Fields["FolderParentRelativePath"].ToString() + RS.Fields["FolderName"].ToString()));
Response.Write("> \n<A HREF=\"right.asp?ID=");
Response.Write(Server.UrlEncode(RS.Fields["FolderParentRelativePath"].ToString() + RS.Fields["FolderName"].ToString()));
Response.Write("\" TARGET=\"right\">");
Response.Write(RS.Fields["FolderName"].ToString() + "</A>\n</TD>\n</TR>\n");
RS.MoveNext();
}
Response.Write("</TABLE></CENTER>");
}
else
Response.Write("No Folders");
oPOPFolders = null;
}
***********************************************************
The RS Object Not Having Any Fields Or Data !!!
How do i get the data from it?
Best Regards
Shag
ADODB.Recordset
But i cant continue from there.
Do u have any example or farther details?
Here is my code and here i am stack :
************************************************************
{
MEWebMail.MailFolders oPOPFolders = new MEWebMail.MailFoldersClass();
ADODB.Recordset RS = (ADODB.Recordset)oPOPFolders.GetFolders(gPostOffice, gUserName, gPassword, "\\");
if (!RS.EOF)
{
Response.Write("<CENTER><TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=2>");
while (!RS.EOF)
{
Response.Write("<TR>\n<TD class=ME_StandardText><IMG SRC=\"");
Response.Write(GetFolderIcon(RS.Fields["FolderParentRelativePath"].ToString() + RS.Fields["FolderName"].ToString()));
Response.Write("> \n<A HREF=\"right.asp?ID=");
Response.Write(Server.UrlEncode(RS.Fields["FolderParentRelativePath"].ToString() + RS.Fields["FolderName"].ToString()));
Response.Write("\" TARGET=\"right\">");
Response.Write(RS.Fields["FolderName"].ToString() + "</A>\n</TD>\n</TR>\n");
RS.MoveNext();
}
Response.Write("</TABLE></CENTER>");
}
else
Response.Write("No Folders");
oPOPFolders = null;
}
***********************************************************
The RS Object Not Having Any Fields Or Data !!!
How do i get the data from it?
Best Regards
Shag
YES, Success!!!!
Thank U Very Much,
I Managed to get the details, here are the result
{
MEWebMail.MailFolders oPOPFolders = new MEWebMail.MailFoldersClass();
ADODB.Recordset RS = (ADODB.Recordset)oPOPFolders.GetFolders(gPostOffice, gUserName, gPassword, "\\");
if (!RS.EOF)
{
Response.Write("<CENTER><TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=2>");
while (!RS.EOF)
{
Response.Write("<TR>\n<TD class=ME_StandardText><IMG SRC=\"");
Response.Write(GetFolderIcon(RS.Fields["FolderParentRelativePath"].Value.ToString() + RS.Fields["FolderName"].Value.ToString()));
Response.Write("> \n<A HREF=\"right.asp?ID=");
Response.Write(Server.UrlEncode(RS.Fields["FolderParentRelativePath"].Value.ToString() + RS.Fields["FolderName"].Value.ToString()));
Response.Write("\" TARGET=\"right\">");
Response.Write(RS.Fields["FolderName"].Value.ToString() + "</A>\n</TD>\n</TR>\n");
RS.MoveNext();
}
**********************************************************
It Works,
Best Regards,
Shag
I Managed to get the details, here are the result
{
MEWebMail.MailFolders oPOPFolders = new MEWebMail.MailFoldersClass();
ADODB.Recordset RS = (ADODB.Recordset)oPOPFolders.GetFolders(gPostOffice, gUserName, gPassword, "\\");
if (!RS.EOF)
{
Response.Write("<CENTER><TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=2>");
while (!RS.EOF)
{
Response.Write("<TR>\n<TD class=ME_StandardText><IMG SRC=\"");
Response.Write(GetFolderIcon(RS.Fields["FolderParentRelativePath"].Value.ToString() + RS.Fields["FolderName"].Value.ToString()));
Response.Write("> \n<A HREF=\"right.asp?ID=");
Response.Write(Server.UrlEncode(RS.Fields["FolderParentRelativePath"].Value.ToString() + RS.Fields["FolderName"].Value.ToString()));
Response.Write("\" TARGET=\"right\">");
Response.Write(RS.Fields["FolderName"].Value.ToString() + "</A>\n</TD>\n</TR>\n");
RS.MoveNext();
}
**********************************************************
It Works,
Best Regards,
Shag
Type of gPostOffice, gUserName, gPassword
i used strings types as follow
string gX = Session["X"].ToString();
string gX = Session["X"].ToString();