Thread: message box
View Single Post
  #1 (permalink)  
Old December 21st, 2005, 07:36 AM
nalla nalla is offline
Friend of Wrox
Points: 464, Level: 7
Points: 464, Level: 7 Points: 464, Level: 7 Points: 464, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: Colombo, , Sri Lanka.
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nalla Send a message via Yahoo to nalla
Default message box


Hi,

I have added an attribute to a button in page load as,

this.btnHome.Attributes.Add("onclick","if(!confirm ('Are you sure to delete this Event?')) return false;");

and this shows the message box properly with 2 options "Ok" and "Cancel". so i added a condition inside the button's click event as,

if(!confirm('Are you sure to delete this Event?'))
   {

   }
else
   {

   }
but this shows 2 syntax errors as,
(1) The name confirn doesnot exist in the class or namespace ....
(2) Too many characters in the character literal.

how can i return whether user pressed "Ok" or "Cancel"??

nalla


__________________
nalaka hewage
http://nalakahewage.blogspot.com