Convert Generic List in Data Table in Asp.net using C#

Convert Generic List in Data Table in Asp.net using C#

Steps for conversion Step 1: //Create structure or class for hold data public struct GetUserInformation { public int UserId { get; set; } public string UserName { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } public bool Approved { get; set; } } Step 2 : public Da
Create DataTable in Asp.net at Run Time

Create DataTable in Asp.net at Run Time

Two ways to create data table 1. //Add Column in data table protected void AddColumns(ref DataTable ModyfiedTable, string[] columns) { for (int i = 0; i < columns.Length; i++) { ModyfiedTable.Columns.Add(columns[i]); } } DataTable ModyfiedTable = new DataTable("ModyfiedTable"); //define the columns string[] Columns = { "Description","Name","Email"}; //Call function to create columns AddColumns(ref ModyfiedTable, Columns); foreach (Info objInfo in myojb.data) { // create new row DataRow Request = ModyfiedTable.NewRow();
Use C# to get JSON data from the web url and map it to .NET Class

Use C# to get JSON data from the web url and map it to .NET Class

Use C# to get JSON data from the web url and map it to .NET Class //Call this function where u want public void GetSubscription() { string requestUrl = " Url from which u want result"; // Send the request with url HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestUrl); //Response coming HttpWebResponse responce = (HttpWebResponse)request.GetResponse(); // var resstream = responce.GetResponseStream(); Stream responseStream = responce.GetResponseStream();
Implementation of FancyBox using Jquery in Asp.net

Implementation of FancyBox using Jquery in Asp.net

Steps for FancyBox implementation in Asp.net Step 1: Add script and style to Header in Caller Design Page
Introduction to Object Oriented Programming Concepts (OOPS) in C#.net

Introduction to Object Oriented Programming Concepts (OOPS) in C#.net

What is OOP? OOP is a design philosophy. It stands for Object Oriented Programming. Object-Oriented Programming (OOP) uses a different set of programming languages than old procedural programming languages (C, Pascal, etc.). Everything inOOP is grouped as self sustainable "objects". Hence, you gain re-usability by means of four main object-oriented programming concepts. In order to clearly understand the object orientation, let’s take your “hand” as an example. The “hand” is a class. Your body has two objects of type hand, named left hand and right hand. Their main functions are controlled/ managed by a set of electrical signals sent through your shoulders (through an interface). So the shoulder is an interface which your body uses to interact with your hands. The hand is a well architected class. The hand is being re-used to create the left hand and the right hand by slightly changing the properties of it. What is an Object? An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, the hand can grip something or a Student (object) can give the name or address.
Jquery Tab in Asp.net

Jquery Tab in Asp.net

Steps for making Jquery Tab in Asp.net Step 1: Add design on form page
  • HTML
  • CSS
  • //Want more tab just increase the li with ID and give the Name what u want in header // Ex: //
  • Style

Tab 1

Tab 2

//For tab content //Make div with ID=li id with name tab and add class="tab-content" //Ex: //
//

Tab 3

//
Step 2: Add script on Page