Print Entered Text

Chanikya
Posted by Chanikya under ASP.NET category on | Points: 40 | Views : 1095
PrintText.aspx



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PrintText.aspx.cs" Inherits="_Default" %>

<!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>PrintText</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>PrintText</p>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" />
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</div>
</form>
</body>
</html>




PrintText.aspx.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text.ToString();
}
}





http://facebook.com/chanikya.chowdary

http://labs.google.co.in/smschannels/subscribe/My-Heart2U

http://smsgupshup.com/groups/friends4ever66

Comments or Responses

Login to post response