Estoy intenrando guardar unos datos de un formulario, y no logro hacerlo.
Podrian por favor indicarme donde esta mi error?
Default.aspx
Código ASP:
Ver original<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentColumn" Runat="server">
<asp:Table ID="Table1" runat="server" Height="104px" Width="100%">
<asp:TableRow runat="server">
<asp:TableCell runat="server" HorizontalAlign="Right">
<asp:Label ID="Label1" runat="server" Text="Producto:"></asp:Label>
</asp:TableCell>
<asp:TableCell runat="server" HorizontalAlign="Left">
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="TableRow7" runat="server">
<asp:TableCell ID="TableCell13" runat="server" HorizontalAlign="Center" ColumnSpan="2">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="CONFIRMA.BMP" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:Content>
Default.aspx.vb
Código ASP:
Ver originalProtected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
cmd.CommandText = "insProductos"
cmd.Connection = cnx
cmd.CommandType = System.Data.CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@CodigoProducto", DropDownList1.SelectedValue)
cmd.ExecuteNonQuery()
End Sub