I have a repeater control, I am retrieving names of people to the repeater control from sql table and showing it and i also made a delete button called DEL next to each name on the page.
when someone hits it. I want to pop open a confirm box and ask if the user really wants to delete specified user.
i can pop open a confirm box and ask a question but how will i put the name in the question?
question is :
1) how can i put the name of the user next to the question in the confirm box since page does not know which button is related with which name?(you can see the file attached for to see names next to buttons)
2)if the user hits OK in the confirm box i want to check if name has any other records and if there are records i want to warn user again...
i am using the confirm box in the source section(html part) but to delete name from the table and to make other controls i need to go to code behind. How will i do that jump from confirm box's OK answer to code behind to make some controls and delete specified user?
In the below code you can see the confirm box but the question is missing the name that i retrieved with EVAL and also if user hits OK where should i write other code to check?;
<asp:Repeater ID="Repeater1" runat="server">
<td><button onclick="confirm('Do you really want to delete?...');">DEL</button