FormView Button not working

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>
 
M

MasterGaurav \(www.edujini-labs.com\)

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
-----------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top