views:

36

answers:

1

i am creating a generalize deleteusercontrol , my aim is that on the listing page where all the records are listed when the delete is pressed i want to display the acknowledgment on the same page up the list. I had little idea to do that

q1) first of all where will i place my deleteusercontrol(in the shared folder?).

q2) on and off the deleteusercontrol as the acknowledgment will not be there all the time how would i be doing that on delete press. i don't want to pass any data in the querystring.

q3)how would i be passing the records list id and listname to the general deleteusercontrol as it would be same for all the listing

A: 

Q1: The shared folder is OK.

Q2: You will need som AJAX magic to accomplish this.

Q3: The same way you pass any data to the view: through a member on the ViewData object. Unless you are using RenderAction to render the UserControl, in which case it gets its own controller method, and you can just pass the data to it directly via its own ViewData object.

Robert Harvey
I'm glad you could decipher what he was talking about...
Luke Schafer