473,473 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Working with a datalist

Hi,

I have a data list that is bound to a datasource which is just a list of
products from a sql table.

What I want to do is configure the data list so that when i person clicks on
an item in the datalist, it redirects them to a page that displays info on
that product.

What I can't figure out is in the templates is how to setup a databinding to
the datalist title so that when the user clicks on the label, the redirect
occurs..

Is this even possible ?

Thanks

Aug 3 '06 #1
7 1181
Ok, i have worked out how to achive what i wanted below, the problem now is
that the when you mouse the mouse pointer of the link, the mouse because a
straight line (like a edit mouse pointer) where as I need it to be the
normal link mouse pointer, so the user can see clearly what to do

How can I set the mouse pointer to be the normal pointer for a href url link
?

Thanks
"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

I have a data list that is bound to a datasource which is just a list of
products from a sql table.

What I want to do is configure the data list so that when i person clicks
on an item in the datalist, it redirects them to a page that displays info
on that product.

What I can't figure out is in the templates is how to setup a databinding
to the datalist title so that when the user clicks on the label, the
redirect occurs..

Is this even possible ?

Thanks

Aug 3 '06 #2
Hello Aussie Rules,

You can add a cursor property to the style attribute to change the cursor to
whatever you would like:

<asp:Label ID="Label1" runat="server" Text="Label"
CssClass="HandCursor"></asp:Label>

In your stylesheet add something like the following element:

..HandCursor
{
cursor:hand;
}

For more information on the cursor property check out:
http://www.pageresource.com/dhtml/csstut10.htm

--
enjoy - brians
http://www.limbertech.com
"Aussie Rules" wrote:
Ok, i have worked out how to achive what i wanted below, the problem now is
that the when you mouse the mouse pointer of the link, the mouse because a
straight line (like a edit mouse pointer) where as I need it to be the
normal link mouse pointer, so the user can see clearly what to do

How can I set the mouse pointer to be the normal pointer for a href url link
?

Thanks
"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

I have a data list that is bound to a datasource which is just a list of
products from a sql table.

What I want to do is configure the data list so that when i person clicks
on an item in the datalist, it redirects them to a page that displays info
on that product.

What I can't figure out is in the templates is how to setup a databinding
to the datalist title so that when the user clicks on the label, the
redirect occurs..

Is this even possible ?

Thanks



Aug 4 '06 #3
Thanks for Brians' good suggestion.

Hi Aussie,

As Brians has suggested, you can use the "cursor" css style to customize
the mouse curor of your html element.

BTW, how do you resolve your first question? Would you also provide us your
DataList item template? There are several different solutions on this
according to the html template of your datalist control. Here is a simple
DataList whicn use an html <tableto display data item in Item template.
And I use table's "onclick" script event to redirect the page, also for
html <table>, we can use the "title" attribute to display a "tooltip" when
the user hover the curor over the html table:

=============================
<asp:DataList ID="DataList1" runat="server" DataKeyField="CategoryID"
DataSourceID="SqlDataSource1">
<ItemTemplate>

<table
onclick="javascript:window.location.href='detailin fo.aspx?cid=<%#Eval("Categ
oryID") %>';"
style="cursor:pointer"
title="Click to view detailed information..."
>

<tr>
<td>
CategoryID:
<asp:Label ID="CategoryIDLabel"
runat="server" Text='<%# Eval("CategoryID") %>'>
</asp:Label><br />
CategoryName:
<asp:Label ID="CategoryNameLabel"
runat="server" Text='<%# Eval("CategoryName") %>'>
</asp:Label><br />
Description:
<asp:Label ID="DescriptionLabel"
runat="server" Text='<%# Eval("Description") %>'>
</asp:Label><br />
<br />
</td>
</tr>
</table>

</ItemTemplate>
</asp:DataList>
===============================

Hope this helps also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 4 '06 #4
Aussies Rules are you baes in Sydney or Melbourne?
Patrick

"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

I have a data list that is bound to a datasource which is just a list of
products from a sql table.

What I want to do is configure the data list so that when i person clicks
on an item in the datalist, it redirects them to a page that displays info
on that product.

What I can't figure out is in the templates is how to setup a databinding
to the datalist title so that when the user clicks on the label, the
redirect occurs..

Is this even possible ?

Thanks

Aug 6 '06 #5
Why do you ask... ??

(actually I am an aussie living in London)
"Patrick.O.Ige" <na********@hotmail.comwrote in message
news:u4**************@TK2MSFTNGP03.phx.gbl...
Aussies Rules are you baes in Sydney or Melbourne?
Patrick

"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Hi,

I have a data list that is bound to a datasource which is just a list of
products from a sql table.

What I want to do is configure the data list so that when i person clicks
on an item in the datalist, it redirects them to a page that displays
info on that product.

What I can't figure out is in the templates is how to setup a databinding
to the datalist title so that when the user clicks on the label, the
redirect occurs..

Is this even possible ?

Thanks


Aug 7 '06 #6
Hi Aussie,

Have you got progress on this issue or have resolved it?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 8 '06 #7
Just asking Aussie Rules
Are you enjoying the u.k?
"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:e6*************@TK2MSFTNGP02.phx.gbl...
Why do you ask... ??

(actually I am an aussie living in London)
"Patrick.O.Ige" <na********@hotmail.comwrote in message
news:u4**************@TK2MSFTNGP03.phx.gbl...
>Aussies Rules are you baes in Sydney or Melbourne?
Patrick

"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>Hi,

I have a data list that is bound to a datasource which is just a list of
products from a sql table.

What I want to do is configure the data list so that when i person
clicks on an item in the datalist, it redirects them to a page that
displays info on that product.

What I can't figure out is in the templates is how to setup a
databinding to the datalist title so that when the user clicks on the
label, the redirect occurs..

Is this even possible ?

Thanks



Aug 8 '06 #8

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

Similar topics

8
by: Brad Simon | last post by:
I have written a shopping cart using ASP .NET (VB). It has been running quite successfully on a site for about a year or so. I use the SessionID as the key to hold information on the shopping...
4
by: tshad | last post by:
I have a DataList that I have set up to allow editing. The edit button does go to the subroutine defined by OnEditCommand. The problem is that it doesn't change the fields to editing fields. The...
3
by: sling blade | last post by:
Hi, I have a dropdownlist in my DataList control and I am trying to set the SelectedItem property of the dropdownlist so when the datalist displays the user will see the text in the dropdownlist...
6
by: Paul | last post by:
I am trying to use a DataList and the ItemTemplate. I am binding the Datalist to a SQL query that gives me a list of Items with a Parent Category. I want to loop through all the items, but...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
6
by: Bina | last post by:
Hi, I m new in c#.net . In C#.net, how i will get the current working path? when i used following function "Application.StartupPath" then it show the executable...
2
by: rhyme2ri2 | last post by:
Hi!! I'm using asp.net 1.1 I have a datalist which gets dynamic data which is of unbound size may be small sometimes and may be very very long sometimes....... Whatever the size of data may be...
1
by: bern11 | last post by:
I'm trying to bind a DataGridView to a BindingList that is a member of the main form. It worked once, then stopped. Now it does not display data when the list is clearly populated. I just get an...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.