Thursday, April 28, 2011

Microsoft Community Contributor Award - 2011

I’m very pleased and honored to share this with all of you that my community contributions have been recognized by Microsoft. I have received the Microsoft Community Contributor Award for year 2011. This was a big and very special surprise to me…

This is great motivation to continue contributing and become even bigger influencer in online and offline community, locally and worldwide!

Microsoft, Thank you.



Wednesday, April 27, 2011

Tool Tip for GridView Header


 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
    
            if (e.Row.RowType == DataControlRowType.Header)
            {
                foreach (TableCell cell in e.Row.Cells)
                {
                    cell.Attributes.Add("title",cell.Text);
                }

            }
        }
 

Wednesday, March 9, 2011

Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.

I saw this problem when i send a mail.The mail button withing a update panel and used a UpdatePanelAnimationExtender. This occured because mail operation relatively long 30 sec or more. What i did, there is a property called AsyncPostBackTimeOut in ScriptManager and set its timeout to 500. Default value is 90.

<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="500">
</asp:ScriptManager>
 

Monday, March 7, 2011

How to check a file if is in use


protected virtual bool IsFileLocked(FileInfo file)
    {
        FileStream stream = null;

        try
        {
            stream = file.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None);
        }
        catch (IOException)
        {
            //the file is unavailable because it is:
            //still being written to
            //or being processed by another thread
            //or does not exist (has already been processed)
            return true;
        }
        finally
        {
            if (stream != null)
                stream.Close();
        }

        //file is not locked
        return false;
    }

 

Firefox doesn't know how to open this address, because the protocol (d) isn't associated with any program.

I saw this error message when i was trying to open a PDF document which in web folder, to a new window. This will take place when you are trying to go to a link to a file on your local disk. In my application i gave the http path like this http://localhost:4150/Admin/doc/invoice/12.pdf. Its working now.
here another reference link
http://forums.mozillazine.org/viewtopic.php?f=38&t=617197

I Built a New Kind of Number Puzzle Game (And You Can Play It Free)

 For a long time, I wanted to play a mobile puzzle game that felt genuinely strategic—something that required real brainpower, skipped the a...