Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Asp.net send email using c#

Nov 30, 2010 91 comments
Introduction:

In this article I will explain how to send email using asp.net.

Description:

In realtime we will use gmail,yahoo,hotmail etc to send mails to particular user here I will show to how to implement mail sending concept in asp.net.

To implement mail concept in asp.net first we need to add following reference to our application System.Web.Mail namespace 

What is System.Web.Mail

System.Web.Mail is a namespace which contains classes that enable us to construct and send messages using the CDOSYS (Collaboration Data Objects for Windows 2000) message component. The mail message is delivered either through the SMTP mail service built into Microsoft Windows 2000 or through an arbitrary SMTP server.

How we can get this reference (System.Web.Mail)

How to disable button after click or during postback and how to change button text after click or during postback in asp.net

Nov 25, 2010 11 comments
Introduction

Here I will explain how to disable button after click or during postback and I will explain how to change the button text after click on button or during postback in asp.net

Description

In many websites we will see disable of button after click on that for getting some content how we can implement that in our application.

Here we need to observe one point that is how we can findout button click and how we can disable button and how we can change text of button during postbacks in asp.net. Here we have chance to get postsbacks by using these statements

SQL Query to get records with or without null values from database

Nov 24, 2010 6 comments
Introduction

Here I will explain how to write a query to retrieve records with or without null values from database in SQL Server.

Description

I have one table with three fields like this 

UserId
Name
City
Education
1
Suresh
Guntur
B.Tech
2
Nagaraju
NULL
MCA
3
Sai

MBA
4
Madhav
NULL
MBBS

Now I need to retrieve records from this table where City not null in this situation I have written query like this.

Query to get only date from datetime in sql server like dd/mm/yyyy, mm/dd/yyyy, yyyymmdd, dd-mm-yyyy etc

Nov 23, 2010 11 comments
Introduction

Here I will explain how to convert or get only date from datetime in different formats like like dd/mm/yyyy, mm/dd/yyyy, yyyymmdd, dd-mm-yyyy etc in SQL Server.

Description

In many situations I got requirement like changing datetime to date and changing the date format to different ways like dd/mm/yyyy or mm/dd/yyyy or dd.mm.yy or yy.mm.dd. We can covert our datetime to date with different formats using different styles. I will display different format of dates with samples check it 

JavaScript make some text non editable - know position of cursor in textbox and disable delete and BackSpace options in keyboard

Nov 4, 2010 4 comments
Introduction

Here I will explain how to make some text non editable in textbox and how to know position of cursor in textbox and how to disable delete and BackSpace buttons in keyboard using JavaScript.

Description

Here I have one country dropdown and one textbox based on the selection of country from dropdown I need to display country codes in textbox. After that user enter mobile number here my requirement is user can edit his mobile number but I don’t want to give chance to edit country code in textbox for that requirement I have written below code

Write following code in your aspx page and check 

how to show the progressbar during postbacks in asp.net

Oct 31, 2010 39 comments
Introduction

Here I will explain how to show update progressbar during postbacks in asp.net

Description

In many websites we will see loading images during process of their websites how we can implement that for our website.

In Ajax we have a control called UpdateProgress control by using this control we can implement progressbar during postsbacks in asp.net.

Here we need to observe one point that is how we can findout postbacks and raise that progrssbar during postback operation in asp.net. Here we have chance to get postsbacks by using these statements

Populate One Asp.net Dropdown based on Selection in Another Dropdown

61 comments
Introduction

Here I will explain how to populate one dropdown based on selection in another dropdown asp.net using c#.

Description

I have three dropdowns Country dropwdown, State dropdown, Region dropdown I need to populate states dropdown based on country dropdown and I need to populate region dropdown based on states dropdown for that what we have to do first design three tables in sql server with data like this 

Calculate age of person from date of birth using JavaScript

Oct 26, 2010 18 comments
Introduction

Here I will explain how to calculate age of person from date of birth and regular expression for mm/dd/yyyy format using JavaScript.

Description

In some situation we need to display age of person based on date of birth .In that situation we can calculate age of person using JavaScript by comparing present date and date of birth as shown below. Here I have a one textbox every time I need to validate that data whether user enter valid data or not if the date not in mm/dd/yyyy format or not.
Regular expression for mm/dd/yyyy date format is

re=/^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d+$/;

If you want to implement code for calculate age of person using javascript design your aspx page like this

Registration form example to insert user details in database using asp.net

Oct 24, 2010 74 comments
Introduction

Here I will explain how to insert registered user details in database and how to get output parameters returned by SQL Query in asp.net.

Description

I have one registration form that give a chance to register new user .In registration form user needs to enter fields UserName, Password, Confirm Password like this I have nearly ten fields are there now I need to check whether this username already exists or not if username not exists I need to register user otherwise I need to display message like username already exists I am doing this thing using query. Here is the link it will explain how to write sql query to return output parameters 

how to display Good Morning,Good Afternoon and Good Evening Messages based on time in asp.net

Oct 22, 2010 7 comments
Introduction

I will explain how to display Good Morning,Good Afternoon and Good Evening Messages based on time in asp.net

Description

In some of websites we will see greeting messages like good morning, good afternoon and good evening messages how to display those messages in our website. Basically those messages will display by calculating present time and we can display that greeting messages.

For that first design your aspx page like this  
© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.