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 http://www.tabatabaei.info.

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

Download url: http://www.tabatabaei.info/sharepoint.aspx

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" />
</asp:CheckBoxList>

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.

<script>
    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 ()
            {
                if(window.event.srcElement.checked)
                    alert(window.event.srcElement.parentNode.attributes["mainValue"].value);
            };
        }
    }
    </script>

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:
http://www.tabatabaei.info/csharpsamples/EventArgsSample.rar

Tuesday, October 14, 2008

7 Version Control Systems Reviewed

If you've ever collaborated with other people on a project, you know the frustration of constantly swapping files. Some do it by email, some through file upload services and some by other methods. It's a pain in the neck, and every designer and developer knows it. Revision control is an excellent way to combat the problem of sharing files between workers.

Most web-developers have probably worked with some sort of revision control system, but designers may find it a foreign concept. The most obvious benefit of using revision control is the ability to have an unlimited number of people working on the same code base, without having to constantly send files back and forth.

But designers and developers can both benefit from using revision control systems to keep copies of their files and designs. You can instantly browse previous "commits" to your repository and revert to earlier versions if something happens.

This article reviews some of the top open-source version control systems and tools that make setting up a version control system easy.

CVS

CVS is the grandfather of revision control systems. It was first released in 1986, and Google Code still hosts the original Usenet post announcing CVS. CVS is the de facto standard and is installed virtually everywhere. However, the code base isn't as fully featured as SVN or other solutions....

Read the rest of this article on :SmashingMagazine.com

Saturday, September 20, 2008

Persian Calendar for SharePoint 2007

Within last a few months me and two of my friends have started working on implementing Persian Calendar for SharePoint 2007. Now after more than 6, 7 month work on this we have the Persian Calendar implemented in SharePoint 2007.

One of the most important point about this package is that youwil stil have your Hijri calendar while you can use Persian Calendar too. Also it 's possible to develop web parts which can use Sharepoint Persian Calendar.
While Microsoft is not supporting Persian calendar on Sharepoint officialy, Now we are negotiating to transfer this technology, with some of the most active companies which are working on providing SharePoint stuff in Iran and Middle East.
You can find out more news about Sharepoint 2007 Persian Calendar on my web site : http://www.tabatabaei.info/

Sunday, August 24, 2008

Disabling Auto-Complete on ASP.NET Forms

Popular browsers, such as Internet Explorer and Firefox support something called Auto-Complete. You've seen this many times. You go to a online form and as you start to type in fields you get a drop-down showing values you've typed in that field before. This feature can be turned off, but it really is a useful feature and can save you a lot of typing when entering redundant values.

As a web developer, you have to be conscious of the fact that the user's browser will likely have auto-complete turned on and be responsible enough to act accordingly. If you have a form that where the user could possibly enter private or secure values you need to be mindful that if the user is on a public computer that these values will be cached by the browser and seen by other users of that computer. You are able to control if the browser uses AutoComplete for your form or for specific values with just a small & simple tweak.
To turn off auto-complete for your entire form, all you need to do is add an attribute to your form tag, like this:
<form id="Form1" method="post" runat="server"
autocomplete="off">
Easy enough. Now you won't get the auto complete on any of the controls on the form, works for any browser that supports auto-complete. The HTML INPUT tags also support the use of autocomplete=off and since the control renders as INPUT tags then you can use it to set it on a control by control basis. Just add it to the TextBox at design-time (but note that VS.NET will underline it with a squiggly saying that textbox does not have an attribute for autocomplete - but it will still work):
<asp:TextBox Runat="server" ID="Textbox1"
autocomplete="off"><!--asp:TextBox>
or at runtime:
Textbox1.Attributes.Add("autocomplete", "off");

From Ryan Farley 's weblog. See the original post on his blog : http://ryanfarley.com/blog/archive/2005/02/23/1739.aspx.

Monday, June 30, 2008

IE Developer Toolbar & Fire Bug

There is lot of tools & utilities that you may use to develop your web application or web site with ASP .NET.
In many cases you may want to debug & watch what is happening on your browser.
If you want to debug your web site behavior in your browsers and check style sheet effect and javascripts and .... I suggest you to use this two utilities:

  1. IE Developer Toolbar
  2. FireBug
Both of them are used to check browser behavior against your html, javascript and style sheets within your web applications, one of them for Internet Explorer and the other one for Mozilla FireFox. I really love FireBug but usually you have to check something for IE users,too.

Click on links below to download these free tools:

Download IE Developer Toolbar
Download FireBug

Friday, June 13, 2008

C# Tuning Training Videos - Async Method Calling - Part One

Finally, I've started to publish some training videos about C# and ASP .NET.
In first video I will explain how to call a method with asynchronous delegates.


C# Tuning Training Videos - Asynchronous Method Calling - Part 1

Monday, May 5, 2008

How to become a great developer?

Fredrik Normén is one of Most Valuable Professionals. He has a post on his blog explaining how to become a great developer. I liked that and I think it can useful for you, if you are planning to be a great developer.

Here is the link to original post on his blog:
Do you want to become a great developer?

Thursday, April 24, 2008

Simple Windows Explorer by C#

This is simple software like Windows Explorer. Of course it’s very simple but in this sample I have covered usage of some of the classes in System.IO namespace such as Path, FileInfo, DriveInfo, FileSystemWatcher, DirectoryInfo.

TreeView is loading it’s nodes On Demand which is an applicable way used in real applications। If you double click on a text file it will be opened in a new window which. I have used StreamReader and StreamWriter classes to implement reading/writing text files. Other file type will be opened by a BinaryReader for you to show the Binary data inside them.

Please let me know if there any error or question within this sample.
Download

Saturday, January 19, 2008

C# Tuning in Farsi

Since almost two month ago, I have started to write some continues articles about Object Oriented Programming and C Sharp in my Farsi web log. I hope this can help Iran, Tajik, Afghanistan and other Farsi speaking people in all around the world to learn C# a bit deeper that in it's useful way.

Please help me on this way by your comments. I will also continue here in C# Tuning.

 

Wednesday, January 16, 2008

"Single Sign-On" my first article on aspalliance.com

I have written an article about Single Sign-On which today is published on http://aspalliance.com web site.
If you are interested in you find in here:

http://aspalliance.com/1545_Understanding_Single_SignOn_in_ASPNET_20

Let me know your feedback.