JavaScript Validations
<p>i want to perform client side validations.. i want to do such that when the firstname is not entered, there shows a messagebox in which it says that firstname is missing and same for all the textboxes.. but i can`t do so :/.. please help! :/ here is my code :</p>

<p>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PhoneBook._Default" %></p>

<p></p>

<p>

    Phone Book


    
    
         First Name
        </p>

<pre><code>    &lt;br /&gt;

    &lt;label id = "LastNameLabel" Text= "First Name" &gt; Last Name&lt;/label&gt;
    &lt;asp:TextBox ID="LastNameTextBox" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;

    &lt;label id = "HomePhoneNumberLabel" Text= "First Name" &gt;Home PhoneNumber&lt;/label&gt;
    &lt;asp:TextBox ID="HomePhoneNumberTextBox" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;

    &lt;label id = "CellNumberLabel" Text= "First Name" &gt;Cell PhoneNumber&lt;/label&gt;
    &lt;asp:TextBox ID="CellNumberTextBox" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;

    &lt;label id = "EmailAddressLabel" Text= "First Name" &gt;Email Address&lt;/label&gt;
    &lt;asp:TextBox ID="EmailAddressTextBox" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;

    &lt;label id = "HomeAddressLabel" Text= "First Name" &gt;Home Address&lt;/label&gt;
    &lt;asp:TextBox ID="HomeAddressTextBox" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;

    &lt;label id = "NICNumberLabel" Text= "First Name" &gt;NIC Number &lt;/label&gt;
    &lt;asp:TextBox ID="NICNumberTextBox" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;asp:Button ID="AddButton" runat="server" Text="Add Record" 
        onclick="AddButton_Click" /&gt;

&lt;/div&gt;
&lt;/form&gt;
&lt;script type="text/javascript"&gt;
if()
{
}

&lt;/script&gt;
</code></pre>

<p>
</p>
