Page 74 - DCAP312_WEB_TECHNOLOGIES_II
P. 74

Web Technologies-II



                   Notes                        End Sub
                                                </script>
                                                <html>
                                                <head>
                                                </head>
                                                <body>
                                                <form runat= “server”>
                                                <p>
                                                <asp:TextBox id= “TextBox1”
                                                runat= “server”></asp:TextBox>
                                                 
                                                <asp:RequiredFieldValidator
                                                id= “RequiredFieldValidator1” runat= “server”
                                                ErrorMessage= “Required!”
                                                ControlToValidate= “TextBox1”>
                                                </asp:RequiredFieldValidator>
                                                </p>
                                                <p>
                                                <asp:Button id= “Button1” onclick= “Button1_Click”
                                                runat= “server” Text= “Button”></asp:Button>
                                                </p>
                                                <p>
                                                <asp:Label id= “Label1” runat= “server”></asp:Label>
                                                </p>
                                                </form>
                                                </body>
                                                </html>

                                           Figure 4.2: Causing the RequiredFieldValidator Server control to fire




























        68                                LOVELY PROFESSIONAL UNIVERSITY
   69   70   71   72   73   74   75   76   77   78   79