Posts

Ajax Calender Extender

http://www.asp.net/learn/ajax-videos/video-124.aspx

ExcellentASP NETCodes

http://www.scribd.com/doc/2946769/ExcellentASP-NETCodes

Using Stored Procedures in Conjuction with DataAdapter

sqlCmd = new SqlCommand(); sqlCmd.Connection = conn; sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandText = "get_wf"; SqlDataAdapter adapter = new SqlDataAdapter(); conn.Open(); adapter.SelectCommand = sqlCmd; adapter.Fill(dataTable);

DataSet vs DataView

using dataview we can just create the view of the table and perform any updations or deletions it wont be affected on the database table. whare as dataset is used for disconnected architecture and we can store any number of tables in the dataset form different data sources using data adapters

Reading Connection Strings in Web.Config and App.Config and Enterprise Library DAAB Settings

Reading All Connection Strings in App.Config or Web.Config Actually, reading all the connection strings in the app.config or web.config is pretty easy now that we have the wonderful System.Configuration Namespace and its rich functionality. The code is pretty straight forward. We can read all the connection strings as well as each name, provider, etc: ConnectionStringSettingsCollection connectionStrings = ConfigurationManager.ConnectionStrings; foreach (ConnectionStringSettings connection in connectionStrings) { string connectionStringName = connection.Name; string connectionString = connection.ConnectionString; string providerName = connection.ProviderName; Debug.Print(connectionStringName); } reference : http://www.davidhayden.com/blog/dave/archive/2007/02/22/ReadConnectionStringsWebConfigAppConfig.aspx

How to read from web.config?

You have to import System.Configuration Lets say you have this in your web.config file: [appSettings] [add key="keyName" value="keyValue" /] [/appSettings] Retrieve it like this using System.Configuration; ConfigurationSettings.AppSettings["keyName"];