How to use a dynamic text link as a post-back trigger?
From: darrel (notreal_at_hotmail.com)
Date: 01/27/05
- Next message: pmclinn: "Format Question"
- Previous message: Alan Silver: "Re: What's the difference/advantages between code behind and code inside?"
- Next in thread: MWells: "Re: How to use a dynamic text link as a post-back trigger?"
- Reply: MWells: "Re: How to use a dynamic text link as a post-back trigger?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 Jan 2005 11:28:59 -0600
I have a form that has a 'sub-form' in it that updates a separate table.
I can easily add records to this table from within this page. To delete,
though, I've been redirecting to a different 'delete' page where it asks for
confirmation before deleting. This works, but the problem is that I loose my
postback information from the main page. Since this is just a small bit of a
larger form, I don't want people to fill out half the form, get to this
point, delete an item, only to see the rest of their form reset.
So...
I decided that the confirmation isn't really that necessary for this, since
it's just a relationship I'm deleting...not the actual record. As such, I
want to delete the item from this page.
The question is how to I create these dynamic 'delete' links? Here's how I
currently do it:
(larger part of form)
item 1 | delete
item 2 | delete
item 3 | delete
these delete links are in a repeater and I build them one by one as such:
a href="deletepage.aspx?itemToDelete=[itemID]
So, I'm passing a specific field with each link to a new page.
Is there a way I can make these dynamicly rendered links (or buttons, if
need be) postback triggers? If so, how can I dynamically attach the itemID
to each one?
-Darrel
- Next message: pmclinn: "Format Question"
- Previous message: Alan Silver: "Re: What's the difference/advantages between code behind and code inside?"
- Next in thread: MWells: "Re: How to use a dynamic text link as a post-back trigger?"
- Reply: MWells: "Re: How to use a dynamic text link as a post-back trigger?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|