Showing posts with label C# Syntax. Show all posts
Showing posts with label C# Syntax. Show all posts

Wednesday, June 10, 2015

Difference between “throw” and “throw ex” in Asp.Net C# Exception


In this post I will try to explain the difference between throw and throw ex in Asp.Net C# Exceptions. My previous post Difference between dataset and datareader in Asp.Net C# exceptions.


Exceptions are always useful for dotnet developers, because we are able to provide a bug free application with the use of exception handlings.We need to find the actual exception, here throw will give the exception details.We are confusing whileusing the throw and throw ex in exceptions.Difference between "throw" and "throw ex" is, "throw" will provide the orginal exception which was available at first in stack and "throw ex" will provide the last exception message available in stack.

Tuesday, February 10, 2015

Send email to multiple receipent in


In this post I will explain how to Send email to multiple recipient in My previous post Difference between union and union all in sql server,How to send email in c#


In my previous posts I have given about Email id validation using javascript in, Sending email using is simple thing but I cannot forget my first task.Because am a fresher without knowing about dotnet I started my carrer, the first task is email sending using I have searched in google for more than 15 days and finally found the solution.Ok let me come to the point, here am trying to explain how to send the same email details to multiple receipents, One way this code will helpful for monthly news letters sending and checking.Also we may easily check the email configuration setting through this.First we may design the screen as mentioned below.

Saturday, December 6, 2014

3-Tier Architecture in ASP.Net C# with step by step example


In this post we will learn how to implement the three tier architecture in our application using Asp.Net c#. My previous post Highlight gridview row color on mouseover using javascript and css


Many interviews we faced the question whether you used 3-tier architecture in your application.Because it is mandatory to know the 3-tier architecture for developing a project. Three tier architecture is a separation of our application into multiple portion which is called as a layer.So we have to understand about the layer in 3-tier architecture.

Saturday, November 29, 2014

Highlight gridview row color on mouseover using javascript and css


In this post I will explain how to highlight gridview row color using javascript and CSS. My previous post Email id validation using javascript in in asp.Net c#.


Asp.Net Gridview control is an adjustable and adaptable control which is used to show bulk information on a column and row basis.As we all know Gridview control will rendered as a table. Even though gridview control is having many features but it has missed some client based attractive things like highlighting gridview control row color. But we can achieve highlighting row in gridview using the below given code. Highlighting a Asp.Net gridview control row is more than just to make it looks good. It serves to distinguish and concentrate on a specific row, since the Gridview shows numerous lines of information at once.

Monday, July 25, 2011

How to maintain the password textbox text after postback


In this post I will explain how to maintain the password textbox text after postback. My previous post SQL Query to find Nth Highest or Lowest salary of an employee table.


In the password textbox will not remain the value after a postback happen, because the viewstate value will disappear. So for retaining the value in textbox control we have again reassign the value in viewstate.

Wednesday, June 29, 2011

Dynamic LinkButton Controls in Asp.Net


In this post I will explain how to create and add dynamic table with dynamic link button in code behind. My previous post Error Logging in C#


In the design page, we just add how many controls we need and where it should be placed. These controls are static and having the data what we gave. In some cases we have to dynamically get data from the database and create dynamic controls for the data.

Tuesday, June 28, 2011

Error Logging in C#

Errors may occur during the development. Not only in the Web sites, it is in all the fields. Every coders may know which place the error will come.Some errors can be easily identified and get a solution easily.But some cases we cant identify what error and why this error is coming like this. For an good website we have to maintain the error log in the Application. So we can track the errors easily and fix the issues sooner.

In this post, we will see how to create a simple error log in our website. We will show an error has been occured message to the user. At the same time,we will log the error in a htm file. The html error file will be created with the name of current date. whenever the error is occurred, It will automatically update with the html file.

Monday, January 4, 2010

Basic Syntax in c# Language

A variable is a location in the memory that has a name and contains a value. Variable means the value can be changed. A variable name may contains ‘_’ (underscore) followed by a sequence of letters, digits(0-9), or underscores. The first character in a variable name cannot be a digit

//Variable Declaration
[data_type] [variable_name]=[value];

//Data types are two types.

Monday, February 9, 2009

Gridview in asp.Net c#.

Dear folks, Welcome to dotnetpgm. This is my first post. This is a dotnet blog. I will share my work experience and ideas in Microsoft .Net Technologies.

Gridview in c# with sample

Grid view control in 2.0 is the replacement of Data grid in 1.1. Grid view is used to bind the data source. The whole database can be viewed in one gridview with colorful and formatted. We can easily view, edit, update and delete the data from this Grid view control. Default Paging is available in this Grid view control. In grid view is a very simple and superb control. It reduce our work and perform good