How to create a built-in validation screen?

Asked

Viewed 50 times

-1

Excuse me if the title is not so explanatory, but the doubt is as follows: I have to do a CRUD and I already managed to do the C and R, but I am doing the page of Update now and the scheme is more or less like this:

Has a page Index listing the objects that can be changed:

Exemplo

and what I would like is that when I click on one of the links, only one modal with the fields I can edit is displayed, and the edit link contains 2 fields with values checkbox (true or false) and the inactivation link is basically the execution of a query update in sql.

How could I do that?

Thank you, if you need more information, let me know!

  • Welcome to [en.so]. Your question is a little wide. You could post the code you are using and explain a little more what you want. Taking advantage, see the [Ask] and do a [tour], to learn a little more about the operation of the site to increase your chances of getting a good response.

2 answers

0

Using Bootstrap for updating data, you can build your form with modal. Sending information can be done through Ajax using jQuery, for example. It is important to say that you need to treat the screen to display a failure message to the user when a failure occurs.

For inactivation, you can also use Ajax, displaying an appropriate message to the user in case of success or failure.

We have several examples here on the site about how to do this. Here I found a functional example.

0

good you can recover by the url would look more or less like this,

 <asp:TemplateField HeaderText="Editar">
   <ItemStyle Width="6%" />
   <HeaderTemplate>Editar
   </HeaderTemplate>
   <ItemTemplate>
       <asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# String.Format("~/Pages/Editar.aspx?{0}", Eval("Id")) %>'Text="Editar"> </asp:HyperLink>
 </ItemTemplate>

and in your c# code of the edit page you can recover the id using Request.QueryString.Tostring()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.