ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: September 2011
http://ankurbhatnagar85.blogspot.com/2011_09_01_archive.html
Friday, 23 September 2011. Importing Contacts from .CSV file. Asp:FileUpload ID="uploadCSV" runat="server" /   . Asp:Button ID="btnUpload" runat="server" Text="Upload Contacts From CSV File" onclick="btnUpload Click" /. Protected void btnUpload Click(object sender, EventArgs e). FileInfo fileInfo = new FileInfo(uploadCSV.PostedFile.FileName);. If (fileInfo.Name.Contains(".csv"). String fileName = fileInfo.Name.Replace(".csv", " ).ToString();. DataTable dtCSV = new DataTable();. Playing with Googl...
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: March 2012
http://ankurbhatnagar85.blogspot.com/2012_03_01_archive.html
Thursday, 22 March 2012. Exception Handling in c#. Program to handle exception using try catch finally. Int x,y,z=0;. Console.Write("Enter X: ");. X=intParse(Console.ReadLine() ;. Console.Write("Enter Y: ");. Y=intParse(Console.ReadLine() ;. Catch(Exception exp) / It is called as Most General Exception.It can handle all the exception because it is a top most pareant of all other exceptions. ClassSo accourding to 'Run Time Polymorphism' Parent class contains the object of their children. Int x,y,z=0;.
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: Data Reader In ADO.NET
http://ankurbhatnagar85.blogspot.com/2012/04/data-reader-in-adonet.html
Wednesday, 11 April 2012. Data Reader In ADO.NET. Using System.Data.SqlClient;. SqlConnection con=new SqlConnection();. ConConnectionString="server=. database=student;integrated security=true;";. SqlCommand cmd=new SqlCommand();. CmdCommandText="SELECT * FROM student";. Console.WriteLine("Sno tSname t tCourse tDuration");. Console.WriteLine("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");. Labels: C# Console Application. Subscribe to: Post Comments (Atom). View my complete profile.
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: DataBase Connectivity in c#
http://ankurbhatnagar85.blogspot.com/2012/04/database-connectivity-in-c.html
Wednesday, 11 April 2012. DataBase Connectivity in c#. Using System.Data.SqlClient;. SqlConnection con=new SqlConnection();. SqlCommand cmd=new SqlCommand();. ConConnectionString="server=. database=Student;integrated security=true;";. Command="CREATE TABLE student(Sno INT PRIMARY KEY IDENTITY(1,1),Sname VARCHAR(30),Cname VARCHAR(30),Duration INT)";. Console.WriteLine("Connected to Sql Server");. Console.WriteLine("Table Created Successfully");. Console.WriteLine("{0} Records Inserted Successfully",n);.
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: July 2012
http://ankurbhatnagar85.blogspot.com/2012_07_01_archive.html
Wednesday, 4 July 2012. Update values in parent window from child. This example explains how to Open PopUp Window In Asp.Net And Update Refresh Parent Child Values using ClientScript . I am opening popup window from aspx page and updating values in parent window from child or popup window using javascript. I have added to labels in Home.aspx page and one button to open popup window. I've also added a PopupWindow.aspx page which is having two textboxes and a button to update lable values of parent page.
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: April 2012
http://ankurbhatnagar85.blogspot.com/2012_04_01_archive.html
Wednesday, 11 April 2012. Data Reader In ADO.NET. Using System.Data.SqlClient;. SqlConnection con=new SqlConnection();. ConConnectionString="server=. database=student;integrated security=true;";. SqlCommand cmd=new SqlCommand();. CmdCommandText="SELECT * FROM student";. Console.WriteLine("Sno tSname t tCourse tDuration");. Console.WriteLine("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");. Labels: C# Console Application. DataBase Connectivity in c#. SqlCommand cmd=new SqlCommand();.
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: String Funtions in C#
http://ankurbhatnagar85.blogspot.com/2012/04/string-funtions-in-c.html
Wednesday, 11 April 2012. String Funtions in C#. Program to demonstrate sting funtions. Instance level funtions: ToUpper(), ToLower(), Trim(), Split(), IndexOf(), LastIndexOf(), Substing(), Contains. String s1,s2;. S1=string.Concat(s1,s2);. Console.WriteLine("Cancat Result: {0}",s1);. Console.WriteLine("Upper Result: {0}",s1.ToUpper() ;. Console.WriteLine("Lower Result: {0}",s1.ToLower() ;. Bool b=s1.Contains("World");. Console.WriteLine("Contains Result: {0}",b);. Int n=s1.IndexOf("llo");.
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: May 2011
http://ankurbhatnagar85.blogspot.com/2011_05_01_archive.html
Sunday, 29 May 2011. Creating Pie-Chart From Telerik RadChart In Wpf. Drag and Drop A radChart Control in your Xaml file. Telerik:RadChart Name="radChartDemo" Width="400" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" /. In Xamal.cs Create User defined method LoadChart() like this-. DataTable tbl = new DataTable();. DataColumn col = new DataColumn("Value");. ColDataType = typeof(int);. Col = new DataColumn("ExcerciseType");. ColDataType = typeof(string);. ItemMapping = new ItemMapping();.
ankurbhatnagar85.blogspot.com
Ankur Bhatnagar: April 2011
http://ankurbhatnagar85.blogspot.com/2011_04_01_archive.html
Saturday, 30 April 2011. How to use web User Control in asp.net. Add A web user control file and write code for that control. Add Place Holder in .aspx file. Asp:PlaceHolder ID="ControlPlace" runat="server" /asp:PlaceHolder. Add line %@ Reference Control=" /UserControls/ScoreCardControl.ascx" % in .aspx file in which you want to use the web user control. In aspx.cs file-. Make object of user control in .cs file. Private UserControls ScoreCardControl controlObj = new UserControls ScoreCardControl();.