I need to make a tooltip that will show the results of a query, a condition for the query should be the name or the text of the label for which the tooltip is.
Do you have any suggestion on this...
Thanks
1. depending on the forum the query result (single result, multiple rows, large amount of text, etc.) would depend on whether I use an actual tool tip or use DHTML to construct a tooltip-like display.
if the result is a number/date/snippet of text i would go with a tool tip. if the result needs to be formatted, is a large amount of text, or contains multiple rows I would go with DHTML.
2. If your architecture allows for it, I would calculate these values ahead of time, off line. this keeps the UI responsive.
3. I would load the calculated values when the page loads to keep the design simple.
the other alternative is to
run the query and preform the computation while the user is waiting for the results. this would be done, either when the page loads, or through an ajax call.
if this is done with ajax I wouldn't use the tooltip at all. i would go with DHTML.
Query result is multiple rows with data for hardware (serial number, computer name, model etc.) located on the network, label is name of network place. How do i calculate values off line?
a common approach is a windows service running on a server. The service would be triggered to process the data. the results are then stored in a location the website can access. with the data calculated ahead of time the website just needs to select the results and display.
there are many ways to notify a windows service to preform an operation. some common approaches are timers, file system watchters, a service bus (nservicebus, mass transit, rhino.servicebus).
Uhh, it's too complicated for me. I need something like this:
<asp:Label id="Label1" Text="name of network place"
ToolTip="SqlDataSource1" runat="server"/>
And if possible, each record to be displayed in a separate row. How to define the tooltip as a value from sql?
I have no idea why you would even want to do this. But this is what you can try, if I understand your issue correctly.
First, DO NOT use the datasource controls.
Second, you will have to run any queries ahaead of time and then store the results to your tooltip, as the page loads.
If that is not what you want, then you will need to use any of the ideas that Jason has supplied. Yes they are complex, but that may be what you need for your issue.
if you are "coding" using the IDE wizards and drag&drop then you're UI won't get much beyond the basic tabular data provided by webforms. The more code the wizards write for you, the less control you have over your application's behavior.
Of course that wizards can not solve the problem, but i only care how to put a variable form query in tooltip source. Is not necessary to calculate values off-line. On that page, that tootip would be the only function.
Thanks for advice!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.