473,387 Members | 1,529 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

need help with repeaters

Hi,

I have a list of around 10 links (<a>).

<a href="one">one</ a>

<a href="two"><two></a>

...

..

<a href="ten"><ten></a>



the thing is that i need to populate the values one, two , three from the database.. please note the one, two etc in the <a> tags are not the ones which needs to be popu;ated from the database, but the ones between the <a> are the ones which needs to be populated from the database.

so how can i do this keeping in mind on clicking each link should go to the sprecified url.



Thanks.

Nitin
Apr 19 '07 #1
1 894
I suposse your links-data are read from a database, i.e. you are generating a dynamic menu or similar.

In the On_Load event (in your .vb if you use vb.net) you read the database and fill a dataset asigning this dataset to the aspx repeater (Me.XX).

In your aspx code you have a <asp:repeater runat="server" id="XX"> inside the <asp:repeater></asp:repeater> you can place an <asp:itemtemplate></asp:itemtemplate> just code inside the itemtemplate your <a href=""></a> reading the current item value.

In the microsoft msdn web there are a couple of good examples regarding <asp:repeater>s.
Apr 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fresh Air Rider | last post by:
I am having trouble getting checkboxes to work within Repeaters and DataGrids I have tried to access the value of each checkbox within a repeater which has been ticked as follows :- string...
0
by: Goncalo | last post by:
Hi. I'm having trouble changing properties of WebControls in Repeaters. In Codebehind, I debug the Repeater on on every ItemDataBound, get the WebControl and I can see the changes were made....
0
by: Machi | last post by:
> let say i created nested repeaters in HTML page of a particular Web Form Parent repeater dubbed >> "parentRepeater", child Repeater dubbed "childRepeater" . Withi "parentRepeater" and...
0
by: Machi | last post by:
let say in parent-child scenerio (Product: Product Category - one product category may has many products), i am using nested repeaters where parent repeater will be used to display info and child...
2
by: Andy Fish | last post by:
Hi, I have a repeater nested within a repeater. After databinding the outer repeater, I loop through the items and databind the inner repeaters, also setting the inner repeater's ItemCommand...
2
by: Matt Jensen | last post by:
Howdy I have 2 repeaters on a C# page, 1 nested under the other. In some cases, the nested repeaters <ItemTemplate> does not contain rows - how does one display a text message in place of the...
1
by: Roy | last post by:
No errors here, I'm just looking for ways to make my code more efficient. As the subject line suggests, I have a LOT of repeaters on a certain page. They are visible or hidden depending on user...
4
by: =?Utf-8?B?SmFtZXMgR2V1cnRz?= | last post by:
On my page, I have one repeater that contains a literal control and a nested repeater. The nested repeater contains a literal control. Both repeaters are databound with only one object (string). ...
1
PrinsonG
by: PrinsonG | last post by:
My Query is How do I export to excel/csv using Nested Repeaters. My project is web-based and i am using C#.Net. In this i use three repeaters. one displays ID, Name of the user. second...
3
by: Leon Mayne | last post by:
If I have a datatable which looks like this: Record Id, Group Id, Name 1, 1, Test 1 2, 1, Test 2 3, 2, Test 3 4, 3, Test 4 Is it possible to use nested repeaters to group the information by...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.