Sunday, December 14, 2008

Microsoft Security Development Lifecycle (SDL) Optimization Model

The Microsoft® Security Development Lifecycle (SDL) Optimization Model is designed to facilitate gradual, consistent, and cost-effective implementation of the SDL by development organizations outside of Microsoft. The model helps those responsible for integrating security and privacy into their organization's software development lifecycle to assess their current state and to gradually move their organizations towards the adoption of the proven Microsoft process for producing more secure software. The SDL Optimization Model enables development managers and IT policy makers to assess the state of security in development. They can then create a vision and road map for reducing customer risk by creating more secure and reliable software in a cost-effective, consistent, and gradual manner. Although achieving security assurance requires long-term commitment, this guide outlines a plan for attaining measureable process improvements, quickly, with realistic budgets and resources.

If you are intereseted in Microsoft Security Development Lifecycle (SDL) here is some links to it:
The Microsoft Security Development Lifecycle (SDL)
Microsoft Security Development Lifecycle (SDL) – Process Guidance

Monday, December 8, 2008

What is Sharepoint?

During last two month I had many phone calls about Microsoft Sharepoint and related subjects, so I have prepared a little document in Persian about what is Sharepoint, features and advantages. You can download it from my personal web site

If you need any further information/assistance, do not hesitate to contact me.

Download url:

Wednesday, December 3, 2008

Value of Selected CheckboxList Item in Javascript

Sometimes, you may need to find which item of your CheckboxList is selected and get it's value on client. Normally ASP .NET CheckboxList does not send its item 's value to client. So if you want to have it, you have to added it your self. In this post I 'm going to show you a simple way to get selected checkbox list item 's value.

First I prepared a checkbox list with some items. In this sample I have added some item manually but you can do this using DataBinding.

<asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatLayout="Table">
    <asp:ListItem Text="Test" Value="110" />
    <asp:ListItem Text="Test2" Value="220" />
    <asp:ListItem Text="Test3" Value="330" />
    <asp:ListItem Text="Test4" Value="440" />

Next, I have to add items value as an attribute for the items:

protected void Page_Load(object sender, EventArgs e)
     foreach (ListItem li in CheckBoxList1.Items)
         li.Attributes.Add("mainValue", li.Value);

Finally, you need to assign a function as click event handler for items. The point is that you can not do it just like the other html element on your page. So I will write a few line of code to add this event handler.

    function AddHandler()
        var tbl = document.getElementById('<%= CheckBoxList1.UniqueID %>');
        for(var i=0;i<tbl.cells.length;i++)
            var cell = tbl.cells[i];
            cell.childNodes[0].onclick = function ()

Notice that I will call this function ("AddHandler") on onload on body.
<body  onload="AddHandler();">

The only thing that you have to be carefull is that this codes will work when you are using CheckboxList with RepeatLayout property is "Table".
Download the sample code from here: