473,789 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Left Nav Panel

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(C onfigurationSet tings.AppSettin gs("ConnectionS tring"))
cmd.CommandText = "GetReportListi ng"
cmd.CommandType = CommandType.Sto redProcedure
cmd.CommandTime out = 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.DataS ource = ds
dlReports.DataB ind()
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">Re ports</td>
</tr>
<tr>
<td>
<asp:datalist id="dlReports" runat="server">
<itemtemplate >
<img height="7" src="../ReportsImages/navlink.gif" width="5">
<a class="NormalDO NE" id="<%#
DataBinder.Eval (Container.Data Item,"Descripti on") %>"
href="ReportMai nPage.aspx?oRep ort=<%#DataBind er.Eval(Contain er.DataItem,"De s
cription")%>">
<%# DataBinder.Eval (Container.Data Item,"Descripti on") %></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=Re port%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
Nov 20 '05 #1
1 1206
Cor
Hi Yama,

I never did this, but my first thought is dropdownlist with the reportlist
in the datatextfield and a command in your datavaluefield refering to an
extra table.

(I would not put the stored procedure in the dropdownlist for security
reasons).

Just a thought.

Cor

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(C onfigurationSet tings.AppSettin gs("ConnectionS tring"))
cmd.CommandText = "GetReportListi ng"
cmd.CommandType = CommandType.Sto redProcedure
cmd.CommandTime out = 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.DataS ource = ds
dlReports.DataB ind()
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">Re ports</td>
</tr>
<tr>
<td>
<asp:datalist id="dlReports" runat="server">
<itemtemplate >
<img height="7" src="../ReportsImages/navlink.gif" width="5">
<a class="NormalDO NE" id="<%#
DataBinder.Eval (Container.Data Item,"Descripti on") %>"
href="ReportMai nPage.aspx?oRep ort=<%#DataBind er.Eval(Contain er.DataItem,"De s cription")%>">
<%# DataBinder.Eval (Container.Data Item,"Descripti on") %></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=Re port%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?

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2792
by: Robert Oschler | last post by:
I know how to load a document into the "Search" panel/sidebar in Internet Explorer. I also know that I can use the "window.opener" property, from the "Search" sidebar document, to change the main window's URL *as long as the user has not navigated away from my web page* that loaded the document into the "Search" sidebar. But I would like to know if there is a way to change the main window's URL even *after* the user has navigated away...
3
3610
by: mitsura | last post by:
Hi, I have included a small listing. The test program opens a panel and show a bitmap. What I want is to when the mouse is over the bitmap panel, I want to trap the left mouse click. The purpose is to get the position of the mouse pointer on the bitmap. However, for some reason, the left (I also tried right) mouse clicks are not intercepted. I new to Python and wxWindows so any help would be greatly appreciated.
4
1704
by: Shimon Sim | last post by:
Is it possible to find top left corner of a control using JavaScript? As far as I know it is very easy to do if you use Grid layout while designing a page. But if you are using flow layout I didn't find any method to find top left corner of a control. I see drop down calendars that drop right under control even though I designed page in flow layout. How do they do it? Thank, Shimon.
9
3187
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected... So the behavour is similar to a tab control. The user is expected to fill out required data on each of the panels before pressing a submit button which is visible from all panels. Problem I have is validating the data entered by the user. I...
1
2441
by: Ronchese | last post by:
Hi All, I 'm doing a form that have two dockable panels, one at top and other at left (for sample). The user can double-clicks the panels and they become floating, which double-clicked again, come back to dock. The problem is, according with the re-dock order, the panels accommodate themselves in different forms. I need the panels
2
2170
by: Peteroid | last post by:
When the application I'm working on is run it creates a panel with a Paint event customized to draw primitives (circles, rectangles, etc.), places the panel on a form, and then launches the form. The weird part is, the panel, in the instant it becomes visible, seems to have an image of what this panel had in it the LAST TIME THE APPLICATION WAS RUN! Since this panel is created anew every time the application is run ('natch), this seems...
14
3736
by: dutch90 | last post by:
Hi I want to make my header table (with the logo and nav menu) start at 0,0. I tried body {margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding:0px;} but I still have about a 3-5px border the color of my page background when viewed in both IE and FF. How can I make it have NO border at
3
7432
by: SteveMac | last post by:
I am using VS2003 VC++ .NET. I want to make a tray icon with a popup menu (like a context menu) that pops up for a left click. I can make the notifyicon with a context menu and that works fine, but I really want it to show the menu for a left click, exactly as it would for a right click. SteveMac
7
3050
by: mahenk | last post by:
Hello Can any body help me with this The problem is As the text increses in height the side bar should also increase. As shown in pic.
2
6685
by: RobinS | last post by:
Is it possible to left-justify, center, or right-justify text on a panel when drawing it using DrawString? I looked at the StringAlignment class, but all it has is far, near, and center. Thanks, Robin S.
0
9659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9504
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10400
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9977
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5413
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4084
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2903
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.