This way.
UserControl
First Name: <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox><br />
Last Name: <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox><br />
Page
<uc:UserControl1 ID="UserControl1" runat="server" />
<asp:Button ID="btnValidate" runat="server" Text="Validate" OnClientClick="return Validate()" />
<script type="text/javascript">
function Validate() {
var txtFirstName = document.getElementById('<%=UserControl1.FindControl("txtFirstName").ClientID %>');
var txtLastName = document.getElementById('<%=UserControl1.FindControl("txtLastName").ClientID %>');
if (txtFirstName.value == "") {
alert("Please enter First Name");
return false;
}
if (txtLastName.value == "") {
alert("Please enter Last Name");
return false;
}
}
</script>