How can you center the text in a label inside a cell? I'm adding the label to the cell dynamically.
Also how can I get the Hyperlink to go down a line? Right now I just add a <BR> in there but is there another way?VB Code:
Dim lbl As New Label lbl.Style.Add("ALIGN", "center") 'these doesn't seem to work lbl.Font.Size = FontUnit.XXSmall lbl.Text = xImage.Attributes("title").Value & "<BR>" 'I can do it by adding html in there but was looking for a better way 'lbl.Text = "<P style=""TEXT-ALIGN: center"">" & xImage.Attributes("title").Value & "</P><BR>" Dim hl As New HyperLink hl.NavigateUrl = xImage.Attributes("fullsize").Value hl.ImageUrl = xImage.Attributes("thumbnail").Value tc = New TableCell tc.Controls.Add(lbl) tc.Controls.Add(hl) tr.Cells.Add(tc)


Reply With Quote