Roy Steeves

Roy Steeves

  • NA
  • 1
  • 821

Resubmit A Page With Form Validation And ASP Buttons

Mar 9 2015 1:47 PM
I have been a Classic ASP developer since 1997. I liked your article titled "ASP.Net Form Validation Using JavaScript". On my Classic ASP pages, one page would server to select an item from a dropdown and allow you to edit that record. The dropdown is filled from a database, which is working fine in my ASP.Net code. When I select the item, the textboxes will be filled with the respective data. I have 2 asp buttons defined on the page, one for Update and one for Delete.
 
 
I do have the OnClientClick calling the client side validation. What your article shows for the btnUpdate_Click event is to redirect to another page. What I want to do is reload the current page so I can have the code behind either Update the current record or delete the current record. What I used to do was execute a javascript function that simply submitted the page with an Action querystring parameter, either Update or Delete.
 
What is the best way to resubmit the page to do the same functionality?