Messaggio di errore del parser: Il formato del tag server non è corretto.codice:<%@ Page Language="VB" %> <script runat="server"> sub ChangeNames(obj as object, e as eventargs) if rlSex.SelectedIndex = 0 then 'femmina lbNames.Items(0).Text = "Sally" lbNames.Items(1).Text = "Sara" lbNames.Items(2).Text = "Hope" lbNames.Items(3).Text = "Kaylee" else 'maschio lbNames.Items(0).Text = "John" lbNames.Items(1).Text = "Chris" lbNames.Items(2).Text = "Daniel" lbNames.Items(3).Text = "Walter" end if end sub sub DisplayMessage(obj as object, e as eventargs) lblMessage.Text = obj.SelectedItem.Text & _ " is a wonderful name!" end sub </script> <html><body> <form runat="server"> <asp:Label id="lblMessage" runat="server"/> Choose the sex of your baby: <asp:RadioButtonList id:"rlSex" runat="server" OnSelectedIndexChanged="ChangeNames" AutoPostBack="true" > <asp:ListItem>Female</asp:ListItem> <asp:ListItem>Male</asp:ListItem> </asp:RadioButtonList> Possible names: <asp:ListBox id="lbNames" runat="server" OnSelectedIndexChanged="DisplayMessage" AutoPostBack="true" > <asp:ListItem></asp:ListItem> <asp:ListItem></asp:ListItem> <asp:ListItem></asp:ListItem> <asp:ListItem></asp:ListItem> </asp:ListBox> </form> </body></html>
Riga 31: <asp:RadioButtonList id:"rlSex" runat="server"

Rispondi quotando