<script language="javascript" type="text/javascript">
function Display()
{
  if(Validate())
    alert('Podano imi '+Form1.Text1.value + ' '+ Form1.Text2.value);
    else
  alert('Wpisz jeszcze raz');
}
function Validate()
{
  if((Form1.Text1.value.length > 0) && (Form1.Text2.value.length > 0))
    return true;
  return false;
}
</script>
<body>
    <form id="Form1" runat="server">
        <div>
            <asp:Label ID="Label1" runat="server" Text="Podaj imi:"> </asp:Label>
            <input id="Text1" maxlength="50" type="text" />
            <asp:Label ID="Label2" runat="server" Text="Podaj nazwisko:"> </asp:Label>
            <input id="Text2" maxlength="50" type="text" />
            <br /><br />
            <input id="btnCheckName" type="button" value="Wywietl" style="width: 100px" onclick="Display();" />
        </div>
    </form>
</body>
