Passing values from client 2 server

Y

Yama

Hi,

Simple question:

Is there a way to a value from client-side to server-side upon a click?

function _getReport(ReportName) { alert(ReportName); }

<asp:datalist id="dlReports" runat="server">
<itemtemplate>
<img height="7" src="../ReportsImages/navlink.gif" width="5">
<a class="Normal" id="<%#
DataBinder.Eval(Container.DataItem,"Description") %>"
href="ReportMainPage.aspx" onclick="return _getReport('<%#
EncryptString(DataBinder.Eval(Container.DataItem,"Description"))%>');">
<%# DataBinder.Eval(Container.DataItem,"Description") %></a>
</itemtemplate>
</asp:datalist>

What I would like to accomplish is to pass the report name to server-side
from client-side upon clicking on a link above.

Yama
 
C

Cowboy \(Gregory A. Beamer\)

Something like, create a hyperlink column in a DataSet and capture the value
sent when the person clicks? There are a variety of other controls,
LinkButton, et al, you can use, as well. Repeater is often better, as you
have more flexibility, but it really depends on what you need.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Y

Yama

Hi Greg,

Thank you for your reponse. I would like, once the list is generated, to
capture the (<%# DataBinder.Eval(Container.DataItem,"Description") %>)
report name every time the user clicks on a link.

How can I do that using LinkButton?

Yama
 

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,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top