Total Pageviews

28 February 2013

How Create Crystal Report in Vissual Studio 2010 with example

Home page
Add caption



























How to Send smtp Mail with the help of asp.net with example



Web configuration=>Here we are setting the smtp port for sending mail in with spacific domain there are several steps are given as blow-
Step First-
<system.net>
    <mailSettings>
      <smtp>
        <network host="smtp.domain.com" port="25" userName="domain id" password="domain password" />
      </smtp>
    </mailSettings>
  </system.net>
  <appSettings>
    <add key="amrit" value="ID@domain.com"/>
  </appSettings>

  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
Step Second-Here we sre designing in Asp.net page.
<div>
To<asp:Textbox id="TextBox3.Text" runat="server" />
Subject<asp:Textbox id="TextBox1.Text" runat="server" />
Body<asp:Textbox id="TextBox2.Text" runat="server" />
<asp:Button ID="Button2" runat="server" onclick="Button2_Click"
            Text="Send Mail" />
</div>
Step Third-
using System.Net.Mail;
 protected void Button2_Click(object sender, EventArgs e)
    {
string fromEmail = ConfigurationManager.AppSettings["amrit"].ToString();
        string toEmail = TextBox3.Text;

        MailMessage message = new MailMessage(fromEmail, toEmail);
        message.Subject = TextBox1.Text;
        message.Body = TextBox2.Text;
       
        SmtpClient smtp = new SmtpClient();
        smtp.Send(message);
}

21 September 2012

How to Implement Reminder mail with help of asp.net with example

Here
 i will disscuss about automatic mail when first time click onbutton then after 10 Second  mail to  received. I hope this post benificial for you.........

Default.aspx=>
<%@ Page Language="C#" AutoEventWireup="true" Async="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Send Mail" />

Default.aspx.cs=>
using System.Web.UI.WebControls.WebParts;
 using System.Web.UI.HtmlControls;
 using System.ComponentModel;// for backgroundworker class
 using System.Net;
 using System.Net.Mail;
 using System.Threading;
 public partial class _Default : System.Web.UI.Page
{
     BackgroundWorker bw;
     protected void Page_Load(object sender, EventArgs e)
     {
         bw = new BackgroundWorker();
         bw.DoWork+=new DoWorkEventHandler(bw_DoWork);
         bw.WorkerSupportsCancellation = true;
         bw.WorkerReportsProgress = false;
     }

    public void SendMail()
     {
         MailMessage msg = new MailMessage();
         msg.From = new MailAddress("abc@gmail.com");
         msg.To.Add("asdf@rediffmail.com");
         msg.Body = "Testing the automatic mail";
         msg.IsBodyHtml = true;
         msg.Subject = "Movie Data";
         SmtpClient smt = new SmtpClient("smtp.gmail.com");
         smt.Port = 587;
         smt.Credentials = new NetworkCredential("abc@gmail.com", "password");
         smt.EnableSsl = true;
         smt.Send(msg);
         string script = "<script>alert('Mail Sent Successfully');self.close();</script>";
         this.ClientScript.RegisterClientScriptBlock(this.GetType(), "sendMail", script);
     }
     public void bw_DoWork(object sender, DoWorkEventArgs e)
     {
         SendMail();
     }
     protected void Button1_Click(object sender, EventArgs e)
     {

        DateTime current_time = DateTime.Now;
         current_time = current_time.AddSeconds(10);
         Thread.Sleep(10000);
         if (current_time == DateTime.Now)
         {
             bw.RunWorkerAsync();
         }
     }
 }

24 August 2012

Basic Introduction of AJAX



Ajax means asnchronous javascript and XML. It is new technique for creating better and faster
and more attractive web pageso or application with te help of XML,HTML,JAVASCRIPT etc.
Here XHTML use for content and CSS use for presentation similarly DOM and Javascript use for dynamic content to display on web application.

Ajax is a web browser technology which is independent on web server software.It is a rich internet application(RIA) technology.



Ajax Working process=>


XMLHTTP Request object
It is use exchange data asynchronously with server.
JavaScript/DOM(Dynamic Object Model)
Interact with the information
CSS(Cascading Style Sheet)
Represent style the data
XML(Extensible Markup Language )
Format of transferring data

27 July 2012

Basic Introduction of SQL Server With Example

 SQL=Pronounced "ess-que-el" (Structure query language) is a language that provide interface to RDBMS(Relational Data Base Management System).
SQL is none procedural language.It is used to communicate with database.It is used to perform the task such as insert, update, Delete,and other activities from database.SQL is reducing timing creating and maintaining systems.
There are following Type
1-DDL(Data Definition Language)
*Create
*Alter
*Drop
*Trancate
*Comment
2-DML(Data Manipulation Language)
*Insert
*Update
*Delete
*Lock Table
3-DCL(Data Control Language)
*Commit
*Savepoint
*Grant/Revoke
*Set of Instruction
4-DQL(Data Query Language)
*Select
*Datatypes
*Char
*number
*date
*Long


25 July 2012

How making function for using validation on textbox in asp.net with example


Here, in this article we are using validation in textbox by using function on client side there are following process for creating a function and this function calling in asp.net button on client side and validation show in popup menu with instruction. Hope this article will be helpful for you.......






<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="DrLogin.aspx.cs" Inherits="DrLogin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
<script language="javascript" type="text/javascript">
//function to disable browser back button
function DisableBackButton() {
window.history.forward();
}
setTimeout("DisableBackButton()", 0);
window.onunload =function () { null };
</script>
<script type="text/javascript" language="javascript">
function amritvalidate() 
{
if (document.getElementById("<%=t1.ClientID%>").value == "")
{
alert("Enter Employee Name");
document.getElementById(
"<%=t1.ClientID%>").focus();
return false;
}
else
if(document.getElementById("<%=t2.ClientID%>").value=="")
{
alert("Enter correct Password");
document.getElementById("<%=t2.ClientID %>").focus();
return false;
}
else
if (document.getElementById("<%=ddl.ClientID%>").value == "Select") {

alert("Please select Designation");

document.getElementById(

"<%=ddl.ClientID %>").focus();
return false;
}
}
</script>

<script type="text/javascript">
function blinkIt() {
if (!document.all) return;
else {
for (i = 0; i < document.all.tags('blink').length; i++) {
s = document.all.tags('blink')[i];
s.style.visibility = (s.style.visibility =='visible') ? 'hidden' : 'visible';
}
}
}

</script>
<style type="text/css">
.blink
{
color: #dc1102;
font-weight: bold;
font-family: Verdana, Tahoma;
font-size: 14px;
}
</style>
</asp:Content>

<asp:Content ID="Content2"ontentPlaceHolderID="MainContent"Runat="Server">
<div>
<blink class="blink" align="Right"><asp:Image ID="Image2" runat="server" 
ImageUrl="~/image/logo.jpg" Height="54px" Width="300px" BackColor="#666699" 
BorderColor="Black" /><br />Welcome To STPL Online Management System</blink>
</div>
<div>
<table class="style3">
<tr>
<td class="style6" colspan="4" style="background-color: #0061AE" height="10px" 
width="911px">
<asp:Label ID="Label2" runat="server" Text="Employee DRSheet Details" BackColor="#0061AE" 
ForeColor="White" Height="18px"></asp:Label>


<asp:Label ID="Label1" runat="server" Height="18px" Text="LOGIN HERE" 
Width="100px" ForeColor="White" BackColor="#0061AE"></asp:Label>
</td>
</tr></table></div>
<div align="center"><fieldset><legend>Employee DRSheet</legend>
<table><tr><td>Employee Name</td><td><asp:TextBox ID="t1" runat="server" Height="21px" Width="170px"></asp:TextBox></td></tr>
<tr><td align="left">Password</td><td><asp:TextBox ID="t2" runat="server" 
Height="21px" Width="170px" TextMode="Password"></asp:TextBox></td></tr>
<tr><td align="left">Designation</td><td><asp:DropDownList ID="ddl" runat="server" Height="25px" Width="172px">
<asp:ListItem>Select</asp:ListItem>
<asp:ListItem>Supervisor</asp:ListItem>
<asp:ListItem>Project Manager</asp:ListItem>
<asp:ListItem>Project Coordinator</asp:ListItem>
<asp:ListItem>Asst.Programmer</asp:ListItem>
<asp:ListItem>Asst.Acountant</asp:ListItem>
<asp:ListItem>Tech. Support Executive</asp:ListItem>
<asp:ListItem>SEO Executive</asp:ListItem>
<asp:ListItem>Hr Executive</asp:ListItem>
<asp:ListItem>Admin HR</asp:ListItem>
<asp:ListItem>Sales Executive</asp:ListItem>
<asp:ListItem>DTP Operator</asp:ListItem>
<asp:ListItem>Assamese Translator</asp:ListItem>
<asp:ListItem>Tamil Translator</asp:ListItem>
</asp:DropDownList></td></tr>

<tr><td></td><td><asp:Button ID="bt" runat="server" Text="Login" 
OnClientClick="return amritvalidate();" onclick="bt_Click" />

<asp:Button ID="bt2" runat="server" text="Cancel" onclick="bt2_Click" /></td></tr>
</table>
</fieldset></div><br />
<br />
<br />
<div style="background-color: #0061AE">
<asp:Label ID="Label3" runat="server" BackColor="#0061AE" Height="18px" 
Width="911px"></asp:Label>
</div>
</asp:Content>




 

19 July 2012

Inroduction .Net Framework 4.0



Here i will disscuss article about the Introduction Of .Net Frame Work 4.0.and others version which come one by one  according technology brifly  reprented as below.Hope this article helpfull for you....

The .NET Framework (pronounced dot net) is a software Framework developed by Microsoft that runs primarily on Microsoft Windows It includes a large librarary and provides language interoperability across several programming languages. Programs written for the .NET Framework execute in a software environment (as contrasted to hardware environment), known as the Common Language Runtime (CLR), an application virtual machine that provides important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.
The .NET Framework's Base Class Library provides user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. Programmers produce software by combining their own source code with the .NET Framework and other libraries. The .NET Framework is intended to be used by most new applications created for the Windows platform. Microsoft also produces a popular integrated development environment largely for .NET software called Visual Studio.
Version
Version Number
Release Date
Visual Studio
Default in Windows
1.0
1.0.3705.0
2002-02-13
 Visual Studio .NET
Windows XP Tablet and Media Center Editions[4]
1.1
1.1.4322.573
2003-04-24
Visual Studio .NET 2003
Windows Server 2003
2.0
2.0.50727.42
2005-11-07
Visual Studio 2005
Windows Server 2003 R2
3.0
3.0.4506.30
2006-11-06
Windows Vista, Windows Server 2008
3.5
3.5.21022.8
2007-11-19
Visual Studio 2008
Windows 7, Windows Server 2008 R2
4.0
4.0.30319.1
2010-04-12
Visual Studio 2010
Windows 7 (recommended)
4.5
4.5.50501
2012-05-31 (RC / release preview)
Visual Studio 2012
Windows 8, Windows Server 2012

Contact Form

Name

Email *

Message *