I have built this simple page with ASP.NEt, as I am new to the language. However, the page loads, but i get a 'syntax error' in IE. But when i view source i cant ee any errors? Sorry if i am missing something, just cant see it???
Code:
<%@ Page Language="VB" Debug="True" %>
<script runat="server">
Sub GetFormInfo(o As Object, e As EventArgs)
theLabel.Text = "Your name is " & Name.text
if Deutschland.Checked then
theCtryLabel.Text = "Your favourite country is Deutschland"
elseif Scotland.Checked then
theCtryLabel.Text = "Your favourite country is Scotland"
elseif Canada.Checked then
theCtryLabel.Text = "Your favourite country is Canada"
elseif Polska.Checked then
theCtryLabel.Text = "Your favourite country is Poland"
end if
End Sub
</script>
<html>
<head>
<link href="style.css" rel="StyleSheet" type="text/css" />
</head>
<body>
<form runat="server">
This is a TextBox, Please Enter your Name:
<asp:TextBox id="Name" runat="server" />
<br /><br />
This is a radio button, Please Select Your Country:
<asp:RadioButton id="Deutschland" GroupName="country" Text="Deutschland" runat="server" />
<asp:RadioButton id="Scotland" GroupName="country" Text="Scotland" runat="server" />
<asp:RadioButton id="Canada" GroupName="country" Text="Canada" runat="server" />
<asp:RadioButton id="Polska" GroupName="country" Text="Polska" runat="server" />
<br /><br />
This is a DropDown List, Please Select Your Favourite Jamaican Football Team:
<asp:DropDownList id="drop" runat="server">
<asp:ListItem>Arnett Gardens FC</asp:ListItem>
<asp:ListItem>Constant Spring FC</asp:ListItem>
<asp:ListItem>Reno FC</asp:ListItem>
<asp:ListItem>Waterhouse FC</asp:ListItem>
</asp:DropDownList>
<br /><br />
This is a list, please Select your Favourite city:
<asp:ListBox runat="server" id="List">
<asp:ListItem>Munchen</asp:ListItem>
<asp:ListItem>Koln</asp:ListItem>
<asp:ListItem>Bremen</asp:ListItem>
<asp:ListItem>Hannover</asp:ListItem>
<asp:ListItem>Stuttgart</asp:ListItem>
</asp:ListBox>
<br /><br />
This is a link, CLICK IT!
<asp:HyperLink id="hyperhyper" onClick="http://www.crmpicco.co.uk" runat="server" />
<br /><br />
This is a button, Click it to Submit the Form:
<asp:Button id="Submit" text="Submit" onClick="GetFormInfo" onMouseOver="style.cursor='pointer'" runat="server" />
<br /><br />
<asp:Label id="theLabel" runat="server" style="border: 2px solid; border-color: #000000; width: 300px;" />
<br />
<asp:Label id="theCtryLabel" runat="server" />
</form>
</body>
</html>
www.crmpicco.co.uk
www.ie7.com