complex repeater/datalist question

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,108
Latest member
AlbertEste
Top