FormView Button not working

  • Thread starter Thread starter David C
  • Start date Start date
D

David C

I have a FormView that I put into Insert mode and entered data fields. The
Insert button has code in the OnClick event to insert the record. I ran
debugging and it does not even run the code. Below is my FormView button
code. Can anyone help please? Thanks.
David
<asp:Button ID="BtnInsertPeople" runat="server" CausesValidation="True"
Text="Insert" OnClick="BtnInsertPeople_Click">

</asp:Button>
 
I have a FormView that I put into Insert mode and entered data fields. The
Insert button has code in the OnClick event to insert the record. I ran
debugging and it does not even run the code. Below is my FormView button
code. Can anyone help please? Thanks.
David
<asp:Button ID="BtnInsertPeople" runat="server" CausesValidation="True"
Text="Insert" OnClick="BtnInsertPeople_Click">

</asp:Button>

Very unlikely... but try out the following code in Page_Load:

void Page_Load(...)
{
string btnValue = Request.Form["BtnInsertPeople"];
Response.Write("Btn value: " + btnValue);

//If you do not see "Btn value: Insert" at the top of the page, there's
some trouble telling who's submitting the form!
}


--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
 
Back
Top