Posts

Showing posts from March, 2011

Avoid insertion of duplicate record using Asp.Net Using Classes

Image
Introduction In this article, i will discuss about avoid duplicate Records insertion with GridView in ASP.NET.Most of times, when we are play with data and gridview in ASP.NET, we may needs to insert records into the database,when users enter in grdiview.so this time user may enter duplicate records twice times.so this article help you all how to avoid duplicate records insert in to the database from presentation layer to database. Implementation Firsy design page like following,  HTML Code <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Duplicate.aspx.cs" Inherits="WebApplication1.Duplicate" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <bo...

Dynamically bind dropdown with months names

Introduction Through this article, i will show to how to Bind item Dynamically to Dropdownlist in ASP.NET. Implementation Just place a drop downlist into your web page, then add  following code to bind items to dropdown list within the page load event. using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Globalization; using System; public partial class _Default : System.Web.UI.Page {     protected void Page_Load( object sender, EventArgs e)     {         if (!IsPostBack )         {             DD_Monthbind();         }     }     private void DD_Monthbind()     {      ...

Search City in asp.net Using google map

Introduction  In this article, i will show to you how to search city map using Google map in ASP.NET.When you are see now days all the web contacts address are attached with map of the city. the Google has been provided a incredible map service to find the address, zipcode, state through the external web application. So we will implement a web application like find the address with Google map in asp.net. Implementation Create a web application project using visual studio and then add following html code in your default page. <table width="300px" cellpadding="2" cellspacing="2" style="border: 1px solid maroon;">                 <tr>                     <td colspan="2">               ...

Email using ASP.NET

Image
Introduction The Email is important in the web site. When you are create a new website you have to implement in the email sending features as well. So in this article I will explain how to send email using ASP.NET with SMTP. Implementation As usual create a simple asp.net web project and then add following html code to design page accept the user input such as subject, to email address, from email address, body.In this demonstration I going to use the sample contact us page email sending. Note : I have used the required validation controls to make sure subject, to email, body are must enter by users. Figure:Contact us HTML Code < body >     < form id ="form1" runat ="server">         < div >             < table width ="700" border ="0" cellpadding ="1" cellspacing ="1">         ...