Left Navigation Pane

Y

Yama

Good Afternoon to all,

What will be the best way to capture ServerClick from a a left menu generated by a datalist?

Private Sub GetReports()
Try
Dim cmd As New SqlCommand
Dim conn As New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
cmd.CommandText = "GetReportListing"
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandTimeout = 360 '-- 6 minutes
cmd.Connection = conn
cmd.Connection.Open()
Dim ds As DataSet = New DataSet
Dim da As New SqlDataAdapter(cmd)
da.Fill(ds, "ReportListing")
dlReports.DataSource = ds
dlReports.DataBind()
Catch eX As Exception
Trace.Write(eX.Message)
End Try
End Sub

<table cellspacing="0" cellpadding="2" width="100%" border="0">
<tr>
<td class="Head">Reports</td>
</tr>
<tr>
<td>
<asp:datalist id="dlReports" runat="server">
<itemtemplate>
<img height="7" src="../ReportsImages/navlink.gif" width="5">
<a class="NormalDONE" id="<%# DataBinder.Eval(Container.DataItem,"Description") %>" href="ReportMainPage.aspx?oReport=<%#DataBinder.Eval(Container.DataItem,"Description")%>">
<%# DataBinder.Eval(Container.DataItem,"Description") %></a>
</itemtemplate>
</asp:datalist>
</td>
</tr>
</table>


This would typically generate for me something like this:

Report A
Report B
Report C
Report NN

Depending on what report is clicked the parameter become visible. I would like to accompllish this without having to pass the report name on the URL as if Report A was clicked the page is rendered ReportMainPage.aspx?oReport=Report%20A

Once you know what the report is it is easy to manipulate anything you want in your logic.

So all I would like to accomplish is to pass the report name but in the code behind any ideas?

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,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top