Jump to content

Help Me - Compiler Error Message: Cs1026: ) Expected

Guest Helder Evandro

Recommended Posts

Guest Helder Evandro

Hi! I'm new here. I'm having problems and I can not get this error. Could someone help me?:) Error in line 6:Server Error in '/' Application.--------------------------------------------------------------------------------Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1026: ) expectedSource Error:Line 4: <!-- ínicio do script listbox -->Line 5: <script runat="server">Line 6: Sub submit(sender As Object, e As EventArgs)Line 7: listboxdata.Text="Você Selecionou " & DropDownList1.SelectedItem.TextLine 8: End Sub --------------------------------------------------------------------------------Abaixo o código:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%@ Page Language="C#" %><!-- ínicio do script listbox --><script runat="server"> Sub submit(sender As Object, e As EventArgs) listboxdata.Text="Você Selecionou " & DropDownList1.SelectedItem.Text End Sub</script><!-- fim do script listbox --><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>Teste Banco de Dados</title></head><body><form id="form1" runat="server"> <asp:AccessDataSource id="AccessDataSource1" runat="server" DataFile="C:\Users\Helder\Documents\My Web Sites\testebd.mdb" DeleteCommand="DELETE FROM [Tabela1] WHERE [Código] = ?" InsertCommand="INSERT INTO [Tabela1] ([nome], [sobrenome], [cidade]) VALUES (?, ?, ?)" SelectCommand="SELECT [nome], [sobrenome], [cidade], [Código] FROM [Tabela1]" UpdateCommand="UPDATE [Tabela1] SET [nome] = ?, [sobrenome] = ?, [cidade] = ? WHERE [Código] = ?"> <DeleteParameters> <asp:parameter Name="Código" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:parameter Name="nome" Type="String" /> <asp:parameter Name="sobrenome" Type="String" /> <asp:parameter Name="cidade" Type="String" /> <asp:parameter Name="Código" Type="Int32" /> </UpdateParameters> <InsertParameters> <asp:parameter Name="nome" Type="String" /> <asp:parameter Name="sobrenome" Type="String" /> <asp:parameter Name="cidade" Type="String" /> </InsertParameters> </asp:AccessDataSource> <asp:DataList id="DataList1" runat="server" CellPadding="4" DataKeyField="Código" DataSourceID="AccessDataSource1" Font-Bold="False" Font-Italic="False" Font-Names="Arial" Font-Overline="False" Font-Size="Small" Font-Strikeout="False" Font-Underline="False" ForeColor="#333333" HorizontalAlign="Center" RepeatDirection="Horizontal"> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <AlternatingItemStyle BackColor="White" /> <ItemStyle BackColor="#EFF3FB" /> <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <ItemTemplate> <strong>Código:</strong> <asp:label id="CódigoLabel" runat="server" Text='<%# Eval("Código") %>' /> <hr />Nome: <asp:label id="nomeLabel" runat="server" Text='<%# Eval("nome") %>' /> <br /> Sobrenome: <asp:label id="sobrenomeLabel" runat="server" Text='<%# Eval("sobrenome") %>' /> <br /> Cidade: <asp:label id="cidadeLabel" runat="server" Text='<%# Eval("cidade") %>' /> <br /> </ItemTemplate> </asp:DataList> <br /> <asp:DropDownList id="DropDownList1" runat="server" DataSourceID="AccessDataSource1" DataTextField="Código" DataValueField="nome"> <asp:listitem Selected="True" Value="1">blablabla</asp:listitem> </asp:DropDownList> <asp:Button runat="server" Text="Enviar" OnClick="submit" id="Button1"></asp:Button> <p><asp:label id="listboxdata" runat="server" /></p></form></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...