# ASP.NET Blogs | CodeAsp.Net

## 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 that. Collection listOfSundays = new Collection ()
Vijendra Shakya  · 9/19/2010  · 1  · 6830
4.83
/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 Leonardo Fibonacci it is named “Fibonacci series”. Fibonacci series are:
Vijendra Shakya  · 9/5/2010  · 1  · 18815
/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 property. Label Control: It is also used for displaying data, it makes formatting techniques when it render.it will render text within span tag.
Vijendra Shakya  · 7/13/2010  · 1  · 31626
/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” is the number of business days. Business days means remove all the Sunday and Saturday which falls between “N” business days from the current date(Or from s
Vijendra Shakya  · 6/18/2010  · 0  · 22739
/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 given year is the leap year, for that the algorithm is: 1. Year should be completely divided by 4 i.e. reminder should be zero. 2. AND, Year should not be c
Vijendra Shakya  · 6/17/2010  · 4  · 12783
/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 one command. In SQL Server there is a system defined Procedure to perform Select, Delete, Truncate, Drop, Alter command on the entire database table.
Vijendra Shakya  · 6/17/2010  · 0  · 9508
/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 is “3 of 9” also known a code 39. Download barcode from above link and exact these in a folder after that just copy and paste font on the following location C
Vijendra Shakya  · 5/4/2010  · 13  · 26874
/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),then we can Find the Max enum values like as follows: String strMaxEnumValue = En
Vijendra Shakya  · 11/29/2009  · 2  · 9766
/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 under System.Web.UI.WebControls namespace.
Vijendra Shakya  · 11/12/2009  · 1  · 6439
/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 achieved this as like:
Vijendra Shakya  · 11/4/2009  · 1  · 4613
4.83
/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 it from database then I want to show it “Singh” instead of 2.I have done this as follows:
Vijendra Shakya  · 10/30/2009  · 0  · 5348
/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 reason to auto refresh the page. 1. Redirecting to a new URL after some specific time. 2. Refreshing page information within a given time period. 3. Maintain
Vijendra Shakya  · 10/6/2009  · 10  · 10589
/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:
Vijendra Shakya  · 9/29/2009  · 0  · 9226
/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()
Vijendra Shakya  · 7/19/2009  · 0  · 11243
/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 User”; SqlCommand cmd = new SqlCommand (sqlQuery, con); Another way is: SqlCommand cmd = new SqlCommand (); cmd.CommandText = "SELEC
Vijendra Shakya  · 7/12/2009  · 2  · 8916
/5
• #### How To Rename ColumnName in SQL

Many times there is needed to change the column name of table.
Vijendra Shakya  · 7/2/2009  · 0  · 4599
/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
Vijendra Shakya  · 6/27/2009  · 5  · 38249
4.89
/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.
Vijendra Shakya  · 6/27/2009  · 1  · 11191
/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 browser stores it. Next time server returns the cookies .cookies are mostly used to store the information about the user, cookies are stores on the client side
Vijendra Shakya  · 6/24/2009  · 2  · 7726
/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.
Vijendra Shakya  · 6/23/2009  · 0  · 4598
/5
• #### Difference between Delete and Truncate in SQL

Truncate is DDL (Data definition language) command. Delete is DML (Data manipulation language) Command.
Vijendra Shakya  · 6/21/2009  · 0  · 3901
/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 results when all given contions are true i.e all conditions to be true.
Vijendra Shakya  · 6/16/2009  · 0  · 2969
/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.
Vijendra Shakya  · 6/16/2009  · 0  · 3253
/5
• #### Use of Count Function in SQL

In SQL Count() function returns number of Rows in a certain table. Count() is an aggerate function(aggerate function returns a single value).
Vijendra Shakya  · 6/16/2009  · 0  · 9390
/5
• #### Alter table command In MSSQL

When we want to add,delete and delete the coloum in the exiting table then we use Alter Command.
Vijendra Shakya  · 4/17/2009  · 0  · 5544
/5

### Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?