November 2005 - Posts
I have found a very great website for resources and tools for IIS.
http://www.iistoolshed.com/tools.aspx
Regards
Check out this Tip:
The ValidateEmptyText property, new in ASP.NET 2.0, fixes an issue with CustomValidator.
In ASP.NET 1.0 custom validation would not fire if ValidationText was empty.
You can set this property to true to cause custom validation to occur for empty input values.
Regards
It was a shock for me to know that my dear friend Jim Ross passed away.
That person stood beside me from the first steps I made on the ASP.NET forums.
He kept on supporting me to the end!!!
Nothing can be said about that person, he was a very helpful person to all mankind.
May God take care of you well Jim.
I do offer my deepest condolences to Jim Ross' family and pray to God to keep them safe.
I will miss you Jim.
Today, I was creating a small tiny script to generate a set of acocunts to be placed in my Database at work. I thought that such a small script doesn't require creating Stored Procedures. So I thought of using simple scripts to execute. However, I had a requirement which was that, if one transaction failed, I must stop the execution of all other scripts executing. I remember I can use SqlTransactions inside my C# code, and not inside TSQL Stored Procedures. Make sure always, when you have a set of SQL queries to execute to use SqlTransaction. The code below works for both ASP.NET 1.x/2.0.
using ( SqlConnection DbConnection =
new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
{
using (SqlCommand DbCommand = DbConnection.CreateCommand())
{
SqlTransaction DbTransaction = null;
try
{
//Open connection required by BeginTransaction
DbConnection.Open();
// Begin the transaction
DbTransaction = DbConnection.BeginTransaction();
// Assign Transaction to Command
DbCommand.Transaction = DbTransaction;
// Execute Create User Command
DbCommand.CommandText = "INSERT INTO TableName(Name) VALUES ('Bilal Haidar')";
DbCommand.ExecuteNonQuery();
// Execute Get newly inserted User ID
DbCommand.CommandText = "SELECT MAX(UserID) FROM TableName";
int UserID = Convert.ToInt32(DbCommand.ExecuteScalar().ToString());
// If you reached this stage, commit transaction
DbTransaction.Commit();
}
catch
{
DbTransaction.Rollback();
}
}
}
Regards
Here are the pics:
LebDev Members: Mohammad, Me [:D], Firas (C# MVP), and Wessam (ASP.NET MVP)

Alone in the Microsoft Event Launching

Muhei our MVP Lead, Chad Hower in the middle, and our LebDev members

Chad and I

Regards
Yesterday we had a nice meeting between the board members of the First .NET User group in Lebanon and Chad Hower in Microsoft Offiice here in Beirut.
We had a long discussion with Chad about development, Kudzu :D, architectures, and many other interestig topics.
After that we went out for a delicious Chinese dinner on behalf of Microsoft :)
Regards