I just using a sql data reader and outputting the data into a regular html
table using
<%Response.Write(objSQLDataReader(0) %>
i was hoping there was a way to put
<asp:LinkButton ID="lbtnDelete" onclick="btnDelete"
CommandArgument="<%Response.Write(objSQLDataReader(0))%>"
runat="server">Delete</asp:LinkButton></td>
thank you.
> that all depends on how you're displaying the data and what's available
> for it, to use
[quoted text clipped - 12 lines]
>> how do i get the linkbutton to pass the database id column value to the
>> sub procedure so it can delete the record? thanks for any help
David C - 05 Sep 2007 19:58 GMT
You could save yourself a lot of time and code by using a GridView.
David
>I just using a sql data reader and outputting the data into a regular html
>table using
[quoted text clipped - 25 lines]
>>> how do i get the linkbutton to pass the database id column value to the
>>> sub procedure so it can delete the record? thanks for any help
George Ter-Saakov - 05 Sep 2007 21:37 GMT
You can always do
iRecordId= Request["__EVENTARGUMENT"];
If you look at the source code of the HTML created you will notice that
CommandArgument parameter end up being moved to hidden field with name
__EVENTARGUMENT
George.
>I just using a sql data reader and outputting the data into a regular html
>table using
[quoted text clipped - 25 lines]
>>> how do i get the linkbutton to pass the database id column value to the
>>> sub procedure so it can delete the record? thanks for any help
Gabe Matteson - 06 Sep 2007 03:38 GMT
Ah I got it into a gridview, lots of time saved.. i have one column that is
an image column and 3 other data columns. when i click edit, it trieds to
edit the graphic column. is there a way that i can disable edits for that
column?
> You can always do
> iRecordId= Request["__EVENTARGUMENT"];
[quoted text clipped - 34 lines]
>>>> how do i get the linkbutton to pass the database id column value to the
>>>> sub procedure so it can delete the record? thanks for any help