I would like to have a radconfirm message on my aspx page, and depending on the answer, would like to do some server-side code.
I have found many, many different forums with multiple solutions for how to implement this logic. I could probably piece something together from what I have found, but I was curious as to the Best practices. I have never really had to communicate between client side and server side like this, so I really don't know what advantages/disadvantages there are to various methods. Would someone be able to "wrap it all up" for me in once post?
My requirements are as follows:
Situation One:
I have a Linkbutton to "Clear". When the user clicks this, I pop up a radConfirm asking them if they are sure. If they answer No, then I do nothing more. If they answer Yes, then I need to run some server-side code. I thought in this situation I would have my "CallBack" function from the radconfirm check the yes/no answer, and if yes, then call some server-side code, otherwise do nothing. Does this sound like a logical method? Best way to call some server-side code from this javascript callback function?
Situation Two:
I have a "Clear" linkbutton inside of a repeater. This linkbutton has a CommandArgument bound to an ID, and I am using a CommandName; when clicked, I "delete" based on the specific ID. Simple enough. Now they want to add a "confirm" prompt to this process, and I would like to use radConfirm for this. I would thing the process I have identified above would be okay, but how would I pass my desired bound ID to my callback function - can I just pass this into the parameter of the callback function?
Thanks for the help!
Stacey
I have found many, many different forums with multiple solutions for how to implement this logic. I could probably piece something together from what I have found, but I was curious as to the Best practices. I have never really had to communicate between client side and server side like this, so I really don't know what advantages/disadvantages there are to various methods. Would someone be able to "wrap it all up" for me in once post?
My requirements are as follows:
Situation One:
I have a Linkbutton to "Clear". When the user clicks this, I pop up a radConfirm asking them if they are sure. If they answer No, then I do nothing more. If they answer Yes, then I need to run some server-side code. I thought in this situation I would have my "CallBack" function from the radconfirm check the yes/no answer, and if yes, then call some server-side code, otherwise do nothing. Does this sound like a logical method? Best way to call some server-side code from this javascript callback function?
Situation Two:
I have a "Clear" linkbutton inside of a repeater. This linkbutton has a CommandArgument bound to an ID, and I am using a CommandName; when clicked, I "delete" based on the specific ID. Simple enough. Now they want to add a "confirm" prompt to this process, and I would like to use radConfirm for this. I would thing the process I have identified above would be okay, but how would I pass my desired bound ID to my callback function - can I just pass this into the parameter of the callback function?
Thanks for the help!
Stacey