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?
Amit ChoudharyPosted Feb 11, 2010, 6:10 AM
i have done this using JQuery library of javascript in GridView. after a few changes in code you can also achieve it and with a good look'n feel of your prompt box. Following project will guide you how to do it.....DOWLOAD PROJECT
Mark the answer if it helps