Thursday, 25 August 2011

To access a file by two process at a time in C#

FileStream  objReader = File.Open(m_sInputFilename, FileMode.Open,FileAccess.Read,FileShare.Read);

Sunday, 7 August 2011

How to make Asp.net Calendar control Read-Only

C# Code behind

protected void calendarMonth_DayRender(object sender, DayRenderEventArgs e)
{
 // Making calendar day Read-Only, i.e no post back
        e.Cell.Text = e.Day.DayNumberText;
}
- you can disable next and prev month directly from property at design time
- the above code will remove the links of day with simple plain text