1
I’m working with a ListView
in which it presents the items in a disorderly list and as links. Under the ListView
has the "CREATE" button to insert a new item into ListView
.
I managed to get that when I edit any item from list by clicking on link, the "CREATE" button Enabled = false
, I did this using the ItemCommand
of ListView
like this one in the code below. The problem is that I wanted to not allow the user to edit another item when he is inserting a new one, some hint?
The "CREATE" button is outside the ListView
.
protected void lvDiagnosticos_ItemCommand(object sender, ListViewCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
criarDiagnostico.Enabled = false;
}
else
{
criarDiagnostico.Enabled = true;
}
}
"Asp.net" is related to the question?
– Renan Gomes
Yes, because the control used is a Listview and is part of ASP.NET, it is in this control that the SQL command is used
– Mario Medeiros