Monday 2 June 2014

asp.net 1: print message

 program to print simple message.

-----------------------------------------DESIGN-----------------------------------------------------


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:TextBox ID="TextBox1" runat="server" Width="223px" Font-Bold="False"
        Font-Names="Times New Roman" Font-Size="Medium"></asp:TextBox>
    <br />
    <br />

    <asp:Button ID="Button1" runat="server" Height="23px" style="margin-left: 39px"
        Text="OK" Width="64px" />
    <br />   <br />
    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger"></asp:Label>
</form>
</body>
</html>

-----------------------------------------code---------------------------------------------------------

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = "Hello " & TextBox1.Text & " Good Morning"
    End Sub
End Class




-----------------------------------------output----------------------------------------------------



umesh sohaliya
codestrew