W
Wee Bubba
i am querying a database and displaying rows of search results on my
web page. the first column of each row contains a <linkbutton>.
when a user clicks this <linkbutton> i want to take some values
of other columns in that particular row and use them in my code
behind.
i know that i can achieve this using the dataList. but i was wondering
if it is possible to achieve this with a repeater?
i thought i might achieve this by dynamically assigning the onclick
event of my <linkbutton> in my .aspx page. e.g i want to use
the column CLIENTNAME value so I put this in my linkbutton tag:
<code>
onclick='ProcessData(<%#((IDataRecord)Container.DataItem)["CLIENTNAME"].ToString()%>)'
</code>
i thought that when a user clicked a row's <linkbutton> this
would allow to call a codebehind function and send it some data for
fields within the selected row. but i am getting an error message:
"Preprocessor directives must appear as the first non-whitespace
character on a line."
i am only trying to use a repeater as i am told it is quicker than a
dataList and this search facility I am developing needs to be quick.
Is there a way to pass the current row values using a repeater or
should I give up?
web page. the first column of each row contains a <linkbutton>.
when a user clicks this <linkbutton> i want to take some values
of other columns in that particular row and use them in my code
behind.
i know that i can achieve this using the dataList. but i was wondering
if it is possible to achieve this with a repeater?
i thought i might achieve this by dynamically assigning the onclick
event of my <linkbutton> in my .aspx page. e.g i want to use
the column CLIENTNAME value so I put this in my linkbutton tag:
<code>
onclick='ProcessData(<%#((IDataRecord)Container.DataItem)["CLIENTNAME"].ToString()%>)'
</code>
i thought that when a user clicked a row's <linkbutton> this
would allow to call a codebehind function and send it some data for
fields within the selected row. but i am getting an error message:
"Preprocessor directives must appear as the first non-whitespace
character on a line."
i am only trying to use a repeater as i am told it is quicker than a
dataList and this search facility I am developing needs to be quick.
Is there a way to pass the current row values using a repeater or
should I give up?