Do I need to sep these into 2 panels?

Hi, I'm using asp.net 3.5 and C#
I have a page where the top half have several textboxes and a submit button when pressed the textboxes data are then saved and that new addition is reflected in the gridview below.  The bottom half has a gridview control that list all records.  

Now I need to provide Edit ability to the Grid view.  When I edit a row and then click the Update but nothing is updated and all required textboxes have a red * next to them.  Is this becuase the Gridview control Update button causes the top half thinks it's also submitting data?  Can I solve this problem by putting these 2 section into 2 panels?  Thank you.
lapuccaAsked:
Who is Participating?
 
nidheeshmcaCommented:

Provide the ValidationGroup Property same for each conttrols of first panel.

Example:
<asp:Panel>
<asp:Textbox id="txt" runat="Server" ValidationGroup="First"></asp:Textbox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ErrorMessage="RequiredFieldValidator" ValidationGroup="First" ></asp:RequiredFieldValidator>
<asp:Textbox id="txt2" runat="Server" ValidationGroup="First"></asp:Textbox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ErrorMessage="RequiredFieldValidator" ValidationGroup="First" ></asp:RequiredFieldValidator>
<asp:Textbox id="txt3" runat="Server" ValidationGroup="First"></asp:Textbox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ErrorMessage="RequiredFieldValidator" ValidationGroup="First" ></asp:RequiredFieldValidator>
<asp:Button id="butt" runat="Server" ValidationGroup="first" ></asp:Button>
<asp:panel>
0
 
suvmitraCommented:
How you are using all these controls through your code that is a question so in that case viewing that code is important. However I would suggest if you need to update the records then use text boxes only for editing the value..do not use grids as grid is best only for viewing records.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
No and no.
The Update button runs the code you provide.  You probably have a mistake in the code somewhere.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
lapuccaAuthor Commented:
Sorry, I didn't make it clear.  the top half textboxes takes in data and submits to create a new record.  The gridview control in the button lists all the records.
0
 
lapuccaAuthor Commented:
I don't have any code in the back.  I only code update in the front using a stored procedure.
ManageAccounts.aspx
0
 
suvmitraCommented:
in that case your .cs file and the sp would help.
0
 
lapuccaAuthor Commented:
That solve the problem.  Thank you and thanks for everyone's input.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.