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

Introduction

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

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 asp.net

Introduction

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

Explanation

In my previous posts I have given about Email id validation using javascript in Asp.net, Sending email using Asp.net 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 asp.net 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

Introduction

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

Explanation

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 Asp.net gridview row color on mouseover using javascript and css

Introduction

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 Asp.net.Gridview in asp.Net c#.

Explanation

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

Introduction

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.

Explanation

In Asp.net 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

Introduction

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

Explanation

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# Asp.net



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 asp.net c# with sample

Grid view control in asp.net 2.0 is the replacement of Data grid in asp.net 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 Asp.net grid view is a very simple and superb control. It reduce our work and perform good

Followers