| Author: sandeep 15 Jul 2008 | Member Level: Gold | Rating: Points: 6 |
just go through this code....
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="User.aspx.cs" Inherits="Default2" Title="User Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script type="text/javascript" language="javascript"> function CheckText() { var text = document.getElementById('<%= TextBox1.ClientID %>').value; if(text.length <= 0) { alert('Enter Your Text...'); } } </script>
<table width="100%" align="center" cellspacing="0" cellpadding="0"> <tr> <td align="center" colspan="2"> <asp:Label ID="Label1" runat="server" Text="OnLine Users!!" Font-Bold="True" Font-Size="10pt" ForeColor="HotPink"></asp:Label> </td> </tr> <tr> <td style="width: 650px" bordercolordark="blue" align="center"> <div id="text" runat="server" style="width: 98%; height: 300px; border-left-color: blue; border-bottom-color: blue; border-top-style: solid; border-top-color: blue; border-right-style: solid; border-left-style: solid; border-right-color: blue; border-bottom-style: solid;"> </div> <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="10pt" ForeColor="HotPink" Text="Enter your Text Here!!"></asp:Label></td> <td bordercolordark="maroon" style="width: 223px" align="center"> <div id="users" runat="server" style="width: 95%; height: 300px; border-left-color: maroon; border-bottom-color: maroon; border-top-style: solid; border-top-color: maroon; border-right-style: solid; border-left-style: solid; border-right-color: maroon; border-bottom-style: solid;"> </div> <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="10pt" ForeColor="HotPink" Text="Send Your Message Here!!" Width="100%"></asp:Label> </td> </tr> </table> <table width="100%" align="center" cellspacing="0" cellpadding="0"> <tr> <td style="width: 630px; border-right: red thin solid; border-top: red thin solid; border-left: red thin solid; border-bottom: red thin solid"> <asp:TextBox ID="TextBox1" runat="server" Height="55px" TextMode="MultiLine" Width="635px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ValidationGroup="5656"></asp:RequiredFieldValidator> </td> <td style="width: 113px; border-right: orange thin solid; border-top: orange thin solid; border-left: orange thin solid; border-bottom: orange thin solid; background: orange" align="center"> <asp:Button ID="Button1" runat="server" Text="Send" Width="75px" Height="28px" OnClick="Button1_Click" OnClientClick="CheckText();" ValidationGroup="5656" PostBackUrl="~/user1.aspx" /> </td> <td style="border-right: green thin solid; border-top: green thin solid; border-left: green thin solid; border-bottom: green thin solid; background: green" align="center"> <asp:Button ID="Button2" runat="server" Text="Cancel" Width="75px" Height="28px" OnClick="Button2_Click" /> </td> </tr> </table> </asp:Content>
|
| Author: tharani 15 Jul 2008 | Member Level: Bronze | Rating: Points: 1 |
Give ne the code in code behind.Both client and server side.
|