Vijendra Shakya | Blogs | CodeAsp.Net

Content

Blogs

• C#: Find all "DayOfWeek" in a year

Here I have discussed about how to get all the dates of any Dayofweek in a year. Below is the stpes to caluclate all Dayofweek in a year. 1. Initialize a Collection for adding all Sundays in...
4.82
/5
• C#: Find Fibonacci Series

Sequence is set of objects (numbers) which are in Orders. Fibonacci series is a sequence of list of numbers which is invented by Leonardo Fibonacci (fi-bo-na-chee) in 1202; on the name of Le...
/5
• Difference between Literal and Label in ASP.NET

Literal Control: It is used to displaying data; it is lightweight and does not make any formatting techniques. Literal control will render only its text which is assigned in its text propert...
/5
• Calculate Business days in ASP.NET C#

Many times we want to find out the next business (working) date after “N” business days. In this blog I have described how to find out the next business date after “N” business days. Here “N...
/5
• Find Leap year in ASP.NET(C#)

Leap year a year which have the 1 extra day from normal year, in leap year February have 29 days, in normal February have 28 day. Leap year has 366 days but normal year have 365. To find the...
/5
• Delete,Truncate All Table's data from Database in SQL Server

In this blog I have discussed about how to Drop all the user defined table from the database OR Select/Delete/Truncate data from all the database tables OR alter the entire database table in...
/5
• Generate BarCode in ASP.NET

Barcode is a machine readable representation of data, which contains the data information. Basically barcode contains data information in parallel line. The most popular of barcode used font...
/5
• Find Maximum value from an Enum

Here I have discuessed find the maximum value from enum. Suppose we have an enum like: public enum TestEnum { A=1, X=2, E=3, R=4, O=5 } if our enum have values like above(Incremented by one)...
/5
• What is Paged DataSource?

PagedDataSource is a class which encapsulates the paging related properties which is required to perform paging in data bound control like Repeater /DataList. PagedDataSource class comes und...
/5
• Find Date after a given week(s) or month(s)

Here I am discussing to find date after a given week or months. For example I want to find the date after 1 week or 2 months from today. Find date after 2 week or 2 months then we can achiev...
4.82
/5
• Find Enum Name from Value

I have the value of this Enum in my database table, when I fetch that value from database then we want to show this value as Enum name. For example in my database there is 2 when I retrieve ...
/5
• Auto refresh page

Here I have discussed how we auto refresh page and why we need to auto refresh the page. Page is Auto refresh means forcing a page to post back without user input. Following is the main reas...
/5
• Bind Repeater With ArrayList

Many times we want to bind the Repeater with ArrayList.We can use Data Source property of Repeater for binding with Array List. Following is HTML page code:
/5
• Difference Between COALESCE() AND ISNULL()

In SQL many times we have null values and we wants return another value, for that purpose in SQL there is two methods: 1. COALESCE() 2. ISNULL()
/5
• What is SQLCommand Objects in ADO.NET

In ASP.NET to execute the SQL Query or Storeprocedure, we use the SqlCommand object. We use the SqlCommand object as follows: // create the SqlCommand object String sqlQuery=”Select * from U...
/5
• How To Rename ColumnName in SQL

Many times there is needed to change the column name of table.
/5
• Find Nth highest salary in SQL

Here I will discuss how to find nth highest salary. Consider we have a User table the column name of the user table are UserName, Salary, City ,Suppose inthis table we have following data
4.88
/5
• Count Number of Tables/Columns in Database

Many time s we want to know How many Tables we used in our Database. Here I have write the query to find the total number of tables/columns used in Database.
/5

A cookie is a small bit of text file that browser creates and stores on your machine (hard drive). Cookie is a small piece of information stores as a string. Web server sends the cookies and...
/5
• Store and Retrieve values from Session

Asp.net provides Session for storing data that is unique for the individual user. Session is stores on the server side.
/5
• Difference between Delete and Truncate in SQL

Truncate is DDL (Data definition language) command. Delete is DML (Data manipulation language) Command.
/5
• AND & OR Operator in SQL

We use AND & OR operator in SQL when Where clause requeries more than one conditions. IN SQL, AND clause is used when we apply more than one condition with WHERE clause, and it gives the res...
/5
• DISTINCT In SQL

The SQL DISTINCT keyword specifies that only distinct / non-duplicate results are to be returned and used together with the SQL SELECT keyword.
/5