ali raza

ali raza

  • NA
  • 80
  • 0

Server side event of the control is not being firing.

Feb 10 2010 1:45 PM

Hi all,   I have a repeater control in which I have custom user control. I have added an attribute on the user control in the ItemDataBound event of repeater control as follows.
 

UserControl1.InputAttributes.Add("onclick", "return NodeClick();");

I have also added following javascript in the aspx page.
 

<script type="text/javascript">
function NodeClick()
{
   if (confirm("Do you really want to select it?"))
   {
      return true;   
   }
   else
   {
      return false;
   }
}

</
script>


I need to call server side event if user click Ok button of confirmation box. Now the problem I am facing is server side event of the user control is not being firing event when user click Ok button.
Any Idea how to get this thing done?

Answers (1)