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,"Des
cription")%>">
<%# 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
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,"Des
cription")%>">
<%# 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