C
Chris
Hi,
i have a formview in Insert mode.
when a new record is inserted, the text of a textbox becomes: "ok".
Instead of using the ItemInserted or ItemInserting, i use my own procedure
like this:
Protected Sub myproc((ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewInsertedEventArgs)
TextBox1.Text = "ok"
End Sub
aspx file:
<InsertItemTemplate>
......
<asp:LinkButton ID="InsertButton" runat="server" OnClick="myproc"
CausesValidation="True" CommandName="Insert" Text="Insert">
</asp:LinkButton>
......
</InsertItemTemplate>
But this gives an error (not same signature ...)
This second example works:
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="myproc2" />
Protected Sub myproc2(ByVal sender As Object, ByVal e As System.EventArgs)
My questions:
1)why does my first example not work and my second does well?
2) how to correct the first example?
Thanks you very much
Chris
i have a formview in Insert mode.
when a new record is inserted, the text of a textbox becomes: "ok".
Instead of using the ItemInserted or ItemInserting, i use my own procedure
like this:
Protected Sub myproc((ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewInsertedEventArgs)
TextBox1.Text = "ok"
End Sub
aspx file:
<InsertItemTemplate>
......
<asp:LinkButton ID="InsertButton" runat="server" OnClick="myproc"
CausesValidation="True" CommandName="Insert" Text="Insert">
</asp:LinkButton>
......
</InsertItemTemplate>
But this gives an error (not same signature ...)
This second example works:
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="myproc2" />
Protected Sub myproc2(ByVal sender As Object, ByVal e As System.EventArgs)
My questions:
1)why does my first example not work and my second does well?
2) how to correct the first example?
Thanks you very much
Chris