I have not been totally clear in my question, for that I apologize.
The case is this: I AM using .aspx pages, in which I'm using VB.NET
for scripting. Now, I already have a <code><form
runat='server'></code> on the page, so I can't make another one. Which
means i must use a normal html form (or some other asp control) for
sending data to a new page. Anyway, the list consists of a varying
number of items, depending on the users query to the database. So,
assuming I can only use a standard html form (which doesn't have much
functionalty), I can't give each item an unique ID, because that
wouldn't tell the next page which button got clicked on. But I
eventually solved the problem: I make a new identical html form for
each line in the itemlist, which each has a <code><input
type"hidden"></code> tag with a value that identifies the listitem.
That way, the next page will automatically know which form got clicked
on, and which input tag it shall retrieve an identifier from. Phew :)
But I'm sure there's an easier way to to it, but like I said, I can't
use a serverside form. And I want to avoid clientside scripts, because
many only work in internet explorer.
Thank you for the response.
"Martin Dechev" <de*******@hotmail.com> wrote in message news:<e4**************@TK2MSFTNGP11.phx.gbl>...
Hi, Yngve H,
Why don't you consider doing it in one aspx page? Like this:
- Set the CommandName and CommandArgument to some useful combination for
each button;
- Set all the buttons to have the same handler for the Command event;
- In that handler do what you intend to do in the second page with your
current design.
Have a look at the example for the Command event:
http://msdn.microsoft.com/library/en...mmandtopic.asp
Hope this helps
Martin