# [web] Using the Repeater Control, ASP.Net

## Recommended Posts

I'm trying to create a rather professional look on my Repeater control and I'm having a hard time with that. My design looks terrible.. most importantly, I'm trying to underline the text and make it so that the highlighting of the entry is done only on the word itself and not the entire line. Moreover, "underlining the word is also important. At the moment I'm using the command below to highlight the entries (WHICH LOOKS TERRIBLE) .. this method below is called each time a line in the repeater is rendered onto the screen.
protected void membersDataItems_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
Panel panel = (Panel)e.Item.FindControl("pnlRow");
//Removed the code here to check if current line needs to be highlighted
panel.BackColor = System.Drawing.Color.Yellow; // this is the code to highlight current line.. BUT HIGHLIGHTS ENTIRE LINE :( (EVEN BLANK SPACE)


EDIT::: I was thinking... Is there a way to access the text inside the panel? This line "Panel panel = (Panel)e.Item.FindControl("pnlRow"); " .. returns the panel.. so maybe there's a way to return the text associated with the panel?? This would allow me to make it a lot nicer and probably allow me to highlight -> "ONLY THE TEXT" and not the entire line. full code Any help on what I should change to make this a little nicer would be great! - Eric [Edited by - Instigator on July 27, 2008 7:10:47 PM]

##### Share on other sites
best way is to create your own control, that way you can modify whatever you like. I hate using the controls (other than the validation controls) in Visual Studio - hate not being able to change every detail.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628294
• Total Posts
2981876

• 11
• 10
• 10
• 11
• 17