I want to show a confirmation box from c# code rather than JavaScript. Is there any way I can have the confirmation box pop up when the below condition is true?
Here is the code so far:
if (items.SelectedNode.ChildNodes.Count >= 1)
{
ScriptManager.RegisterStartupScript(this.nav_tree_items, typeof(string), "Alert", "alert('Hello');", true);
}
I have already tried add.attributes, but that does not work.
I also tried the following but on click of cancel it performs an action anyway:
if (items.SelectedNode.ChildNodes.Count >= 1)
{
ScriptManager.RegisterStartupScript(this.nav_tree_items, typeof(string), "Confirm", "Confirm('Hello');", true);
}
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)