Thursday, December 27, 2012

Set DropDownList Value from Codebehind

To set value of dropdownlist (assuming you have the list populated), do following:

DropDownList1.SelectedValue = "your item value"

 

Monday, December 24, 2012

SQL Index Drop and Create Order


Always drop the Non Cluster Index first as it has reference to Cluster Index.
If Cluster Index was removed first, non Cluster Index would have to be updated on cluster index removal.
When you build index, first build the Cluster Index and then Non Cluster.

Note: All NON Cluster Indices can be build simultaneously once Cluster Index is created.

STATISTICS_NORECOMPUTE


During Index Rebuild, one of the parameters a user can set is Statistics_NoRecompute.
The default value is OFF which means "Automatic statistics updating are enabled"
ON = Out-of-date statistics are not automatically recomputed