brotherincode.blogspot.com
Brother In Code: February 2011
http://brotherincode.blogspot.com/2011_02_01_archive.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Monday, February 7, 2011. Populate Datagrid Using Datareader in C#.Net. String SQLstr = "Select * from Employee";. SqlConnection con = new SqlConnection("Connection String");. SqlCommand com = new SqlCommand(SQLstr, con);. SqlDataReader read = com.ExecuteReader();. DataTable dt = new DataTable();. Finally bind the data to the grid. DataGridView1.DataSource = dt;. String SQLstr = "Select * from Employee";.
brotherincode.blogspot.com
Brother In Code: May 2011
http://brotherincode.blogspot.com/2011_05_01_archive.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Sunday, May 29, 2011. Self Join and when do you use it. Self Join and when do you use it. Use the script below to create Employee Table and populate it with some sample data. We will be using Employee Table to understand Self Join. CREATE TABLE EMPLOYEE (. EMP ID] INT PRIMARY KEY,. INSERT INTO EMPLOYEE VALUES(101,'Amol',102). INSERT INTO EMPLOYEE VALUES(102,'Amit',104). INNER JOIN EMPLOYEE E2. This is beca...
brotherincode.blogspot.com
Brother In Code
http://brotherincode.blogspot.com/2011/12/asp.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Thursday, December 22, 2011. ASPNet DataBound Controls and their Differences. Has default layout and support custom layout. Renders Multiple records at time). Supports default as well as custom paging. Allows adding custom column and apply custom formatting to columns. Supports Data bound filed, DataControl filed, Command filed and Hyperlink filed. Has default layout and support custom layout. DataListView...
brotherincode.blogspot.com
Brother In Code: Forms Authentication Configuration
http://brotherincode.blogspot.com/2011/12/forms-authentication-configuration.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Tuesday, December 20, 2011. The default attribute values for forms authentication are shown in the following configuration-file fragment. The default attribute values are described below:. 4 name and path. Are set to the values defined in the application's configuration file. Is set to false. This configuration means that authentication cookies can be transmitted over channels that are not SSL-encrypte...
brotherincode.blogspot.com
Brother In Code: Catching SQLException in C#.Net
http://brotherincode.blogspot.com/2012/01/catching-sqlexception-in-cnet.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Tuesday, January 17, 2012. Catching SQLException in C#.Net. Catching SQLException in C#.Net :. Using (SqlConnection Con = new SqlConnection("ConnectionString"). SqlCommand InserCmd = new SqlCommand();. InserCmd.Connection = Con;. InserCmd.CommandType = CommandType.StoredProcedure;. InserCmd.CommandText = "SP Name";. StringBuilder ErrorText = new StringBuilder();. Labels: Catching SQLException in C#.Net.
brotherincode.blogspot.com
Brother In Code: September 2010
http://brotherincode.blogspot.com/2010_09_01_archive.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Friday, September 24, 2010. Inheritance and Polymorphism - OOPS. Protected string name ;. Protected float balance ;. Public account ( string n, float b ). Balance = b ;. Public void deposit ( float amt ). Balance = amt ;. Public void withdraw ( float amt ). Balance -= amt ;. Console.WriteLine ( “Name: {0} Balance: {1}”, name, balance ) ;. Class savingaccount : account. Static int accno = 1000 ;. Int trans ;.
brotherincode.blogspot.com
Brother In Code: Send Mail through Gmail or Hotmail using C#.Net
http://brotherincode.blogspot.com/2012/01/send-mail-through-gmail-or-hotmail.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Tuesday, January 17, 2012. Send Mail through Gmail or Hotmail using C#.Net. Using System.Collections.Generic;. Using System.Linq;. Using System.Web;. Using System.Web.UI;. Using System.Web.UI.WebControls;. Using System.Net.Mail;. Public class SendMail App. Public static bool SendMail(string message, string mailFrom, string mailTo, string subject). MailMessage ourMessage = new MailMessage();. Yahoo technica...
brotherincode.blogspot.com
Brother In Code: Error Handling in SQL Server
http://brotherincode.blogspot.com/2012/01/error-handling-in-sql-server.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Tuesday, January 17, 2012. Error Handling in SQL Server. Error Handling in SQL Server. Handle the exception details. Below is the list Error handling properties :. Returns the error number regardless of how many times it is run, or where it is run within the scope of the CATCH block. Returns the error state regardless of how many times it is run, or where it is run within the scope of the CATCH block.
brotherincode.blogspot.com
Brother In Code: March 2011
http://brotherincode.blogspot.com/2011_03_01_archive.html
This Blog will help Programmers to solve the coding problem that they generally faced while coding. Friday, March 11, 2011. Copy Pecific Columns(With Data) of One DataTable To Unother DataTable. Copy Pecific Columns(With Data) of One DataTable To Unother DataTable. There are two datatable DT1 And DT2. DT1 Consists of below 5 Coloumns:. Now I Want to Copy Only below 3 columns data to DT2. Create Array with required coloumns Name. String[] cols = {"EmpID","EmpName","Designation"};. Fill DataTable in Array.