Problem with Confirm C#.Net ASP.Net 2005 Frame Work 2.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gmail
    New Member
    • Aug 2007
    • 8

    Problem with Confirm C#.Net ASP.Net 2005 Frame Work 2.0

    Hi Friends,
    Please help me out on this.

    Code :
    function delete1()
    {
    var i=confirm("do you want to delete current row");
    alert(i);
    if (i==true)
    {
    hidden1.value=i ; //hidden1 is hidden field;
    }
    }

    I am calling this method in in button click source code as
    onclientclick=" delete1();"

    in .cs file i am using the following code in button click.

    if (hidden1.value= =true)
    {
    dw1.deleterow(0 );
    }
    else
    {
    label1.text="so rry";
    }

    Its working with out any error. But while deleting even though i pressed cacel
    it is deleting row.

    I think its the problem with catching the boolean value.Whether it is true or false in code behind.

    Thanks in adance,
    gmail
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    This type of problem can be dealt with by using basic debugging techniques - writing out values and commenting out lines. HTH.

    Comment

    • gmail
      New Member
      • Aug 2007
      • 8

      #3
      Hi Friend,
      That's Great. I am using DataWindow.net. I tried all the ways.
      Thats fabulous if you come up with solution code for this.

      Cheers,
      gmail.

      Comment

      Working...