R
RN
I am dynamically adding a number of HTML buttons to a page...
<input type="submit" name="alwaysthesame" id="different1"
value="alwaysthesame">
<input type="submit" name="alwaysthesame" id="different2"
value="alwaysthesame">
<input type="submit" name="alwaysthesame" id="different3"
value="alwaysthesame">
I want them all to have the same name NAME attribute and the same VALUE
attribute, but different ID attributes. This way I can have a bunch of
buttons and easily check for which one was pressed. Like having a "radio
button group" but instead it will be a "command button group" with each
button in a different place. I don't want to dynamically add server-side
controls because it would be really hard to have different NAME fields
considering that the number of buttons I have to create is different
depending upon the data.
The problem with "html only" way of sending the data is that I can't figure
out to how read the "id" value back from the server on postback. Is there
a way?
<input type="submit" name="alwaysthesame" id="different1"
value="alwaysthesame">
<input type="submit" name="alwaysthesame" id="different2"
value="alwaysthesame">
<input type="submit" name="alwaysthesame" id="different3"
value="alwaysthesame">
I want them all to have the same name NAME attribute and the same VALUE
attribute, but different ID attributes. This way I can have a bunch of
buttons and easily check for which one was pressed. Like having a "radio
button group" but instead it will be a "command button group" with each
button in a different place. I don't want to dynamically add server-side
controls because it would be really hard to have different NAME fields
considering that the number of buttons I have to create is different
depending upon the data.
The problem with "html only" way of sending the data is that I can't figure
out to how read the "id" value back from the server on postback. Is there
a way?