Hola! Ya lo he probado todo y sigue sin funcionarme. No se ya que es lo que pasa o que hago mal.Lo que queria hacer era un poco mas complicado pero te mando el ejemplo que he hecho de lo mas sencillo para ver que tampoco funciona. Te mando el codigo de mi pagina y te mando tambien el error.
CODIGO:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="borrar.aspx.vb" Inherits="Inmobiliarias_borrar" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Página sin título</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem>Estella</asp:ListItem>
<asp:ListItem>Solares</asp:ListItem>
<asp:ListItem>Ermua</asp:ListItem>
</asp:DropDownList>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conexion buena %>"
ProviderName="<%$ ConnectionStrings:conexion buena.ProviderName %>" SelectCommand="SELECT inmobiliaria, zona FROM nerea2_inmobiliarias WHERE ([zona]=@zona)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="zona" PropertyName="SelectedValue" Type="string" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
ERROR QUE SE GENERA:
Error de servidor en la aplicación '/PLANTILLA gridview-detailsview28-03-2008'.
--------------------------------------------------------------------------------
Uno o más errores al procesar el comando.
ORA-00936: falta una expresión
Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.
Detalles de la excepción: System.Data.OleDb.OleDbException: Uno o más errores al procesar el comando.
ORA-00936: falta una expresión
Error de código fuente:
Se ha generado una excepción no controlada durante la ejecución de la solicitud Web actual. La información sobre el origen y la ubicación de la excepción pueden identificarse utilizando la excepción del seguimiento de la pila siguiente.
Seguimiento de la pila:
[OleDbException (0x80040e14): Uno o más errores al procesar el comando.
ORA-00936: falta una expresión]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +177
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +194
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +56
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +105
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +91
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +4
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1659
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +13
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +140
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +68
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +61
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +67
System.Web.UI.Control.EnsureChildControls() +97
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5731
Siento mucho el trabajo que te estoy dando, pero me estas ayudando mucho, GRACIAS.