C# string

C# string is a object of class String. Value of string is text, which is nothing but the collections of read-only char Objects. In C# we can do various string operations like strings splitting, string indexOf, string reverse, string format , we can...

gridview add new row

In this post we will see how to add new row to grid. Gridview have a footer template. By default the visibility is false for this footer template . On add new row button click event, we will set the visibility of Gridview footer row to true and bind the grid again. Aspx code: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">...

C# read text file

In this post we are going to discuss how to read text file in c#. .Net provides File class in System.IO namespace which contains methods to read file from the disk. We can read all the contents of text file in one go using ReadAllText() method of File class. Also we can use ReadAllLines() method of File class and read each line of the file and...

ASP.Net Authentication Modes

ASP.Net supports below authentication modes: 1. Windows 2. Forms 3. Passport 4. None To enable authentication provider or mode we need to use authentication element from config file. <system.web> <!-- mode=[Windows|Forms|Passport|None] --> <authentication mode="Windows" /> </system.web> 1.Windows:   This is a default...