Click here to Skip to main content
16,012,843 members

Comments by Ranju_test (Top 4 by date)

Ranju_test 15-Jun-15 6:25am View    
Can you please suggest how this TimeSpan could be used
Ranju_test 12-Jun-15 5:32am View    
Ok....can you please help me to sort this question
Ranju_test 12-Jun-15 5:10am View    
public string BindDisplayUntil(ref SqlDataReader rs, bool edit)
{
string html = "";

if (edit)
{
html = "<input type=text maxlength=10 class=input size=14 name=display_until_date id=display_until_date";
html += " value=\"" + String.Format(rs["display_until_date"].ToString(), "M/d/yyyy").ToString() + "\">";
html += "";
html += "<img src=\"images/icon-calendar.gif\" align=\"baseline\" alt=\"Show/Hide Calendar\" border=0 width=\"24\" height=\"16\">
";
}
else
{
html = "<span" + (DateDiff("d", rs["display_until_date"], Now()) > 0 ? " style=\"color:red;\"" : "") + ">";
html += String.Format(rs["display_until_date"].ToString(), "M/d/yyyy").ToString() + "</span>";
}

return html;
}

I have this C# code when am running this code the following error arises
html = "<span" + (DateDiff("d", rs["display_until_date"], Now()) > 0 ? " style=\"color:red;\"" : "") + ">";
The name 'DateDiff' does not exist is current context.

The 'DateDiff' keyword i need to replace in C#
Ranju_test 12-Jun-15 1:16am View    
the error is "The name 'AttachmentCollections' does not exist in current context"