Sanjeev

Sanjeev

  • NA
  • 28
  • 0

avoid getting save confirmation on button click

Jan 30 2006 4:44 PM

I have a search button on my web page, which is supposed to save the contents of the page  into the database before it does the search.
Before i save the contents i get a confirmation from the user -- for which i'm using the following code -

btnSearch.Attributes.Add("onClick", "javascript:return confirm('Are you sure you want to save')") ;
my problem is that, i do not want the above confirmation message to appear, when the user clicks the Search button
for the first time, as there's nothing to save at that moment, and rather execute the search code.
Please advise.