Hello All,
I have a problem in a project i am doing. Can any1 please help me in this.
I have a drop down list as follows :
<asp:DropDownList ID="PostActionDDL" runat="server" EnableViewState="false" OnSelectedIndexChanged="activeRegistrant_SelectedIndexChanged"
AutoPostBack="true" >
<asp:ListItem Value="0">Select an Action</asp:ListItem>
<asp:ListItem Value="1">View</asp:ListItem>
<asp:ListItem Value="2">Delete</asp:ListItem>
</asp:DropDownList>
And i have the C# code as follows :
protected void activeRegistrant_SelectedIndexChanged(object sender, EventArgs e)
{
///Some code..
int selectedAction = Convert.ToInt32(dropList.SelectedValue);
switch ((RegistrationActions)selectedAction)
{
case RegistrationActions.View:
Response.Redirect("RegistrantDetails.aspx?id=" + registrationId.ToString());
break;
case RegistrationActions.Delete:
DeleteRegistration(registrationId);
//some code...
break;
}
}
Now, everything here is fine and working. But now, if the user clicks delete, the data will be deleted without any conformation. So, if the user clicks delete only, ( not for view) i need a pop up which should ask , are you sure you want to delete ?
And if the user clicks view, no pop up should come.
Can any1 please help me...
Thanks