While playing in data tables in .net, it may require to have some temporary values such as records counts, primary key field name, …etc. In those situations, instead of declaring new variables in the program, it is ideal way to use “ExtendedProperties” option in datatable. The property is holding the collection (hashtable) values. Here is the syntax; DataTable.ExtendedProperties.Add (object key, object value); Examples; DataTable dtObj = new DataTable("employees"); dtObj.ExtendedProperties.Add("totalCount", 500); dtObj.ExtendedProperties.Add("primaryKey", "employee_id"); dtObj.ExtendedProperties.Add("createdDate", DateTime.Now); For retrieving assigned properties, int iCount = Convert.ToInt32(dtObj.ExtendedProperties["totalCount"].ToString()); So simple and effective property.
We might used the "Charactercasing" property of Textbox in C# windows applications. This is used to get the input values as upper or lower case without doing the separate coding. But in web applications,this property is not available directly. But we need to achieve this functionality using CSS. In CSS, we need to use the "text-transform" property to make the input text as upper, lower or initcaps. Here is the CSS sample: .makeuppercase { text-transform:uppercase; } .makelowercase { text-transform:lowercase; } .makeinitcaps { text-transform:capitalize; } Need to assign the style name to TextBox "CssClass" property as; TextBox1.CssClass = "makeuppercase" The above code will make the input values to upper case while entering the values.
It is little harder to keep remember passwords of our Gmail accounts all the time. Recently, I have found the following chrome browser extension "Quick Login for Google Accounts" which solves the above problem. No more worries about the password maintenance. It is also secure. More details about the Quick Login chrome extension; Quick Login for Google Accounts Really good and simple extension. Thanks to the guys who created this.
Comments
Post a Comment