|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Alignment of webcontrols...Using Vb.Net v1.1, I have several aspx controls (textboxes, listboxes,
dropdown lists) that I need to align the text within the control... I've tried: lst.Attributes.Add("style", "text-align: center;") in the code-behind, and it does not work. I have also tried setting the index and doing it on PreRender (like you would for a datagrid) but I get an error "Item' is not a member of System.EventArgs" on this: Dim item As ListBox = CType(e.Item, ListBox) Does anyone have any suggestions for something that OUGHT to be simple? TIA, Coleen I use the Style member of WebControl to style the control rather than
use the Attributes member directly. Dim currencyBox1 as TextBox 'Align text within currencybox to the right. currencyBox1.Style.Add("Text-Align", "right") Thanks! Just a variation of what I was trying, but it DOES work! Thank you
very much! <CaffieneR***@gmail.com> wrote in message Show quoteHide quote news:1143028983.518433.299810@g10g2000cwb.googlegroups.com... > I use the Style member of WebControl to style the control rather than > use the Attributes member directly. > > Dim currencyBox1 as TextBox > 'Align text within currencybox to the right. > currencyBox1.Style.Add("Text-Align", "right") > This is exactly what I want to do with a 'Month Year' listbox I've just
added. So I used your code as follows: listBoxDates.Style.Add("Text-Align", "right"); But it didn't change anything. Any idea why? Show quoteHide quote "CaffieneR***@gmail.com" wrote: > My pleasure. > >
How to add client script to a pushbutton in datagrid
Bind data to control inside a Repeater Master/Details cloning a record? GridView disapears after entering edit mode. ObjectDataSource method as another ObjectDataSource put control in a repeater cell from code behind Refreshing TreeView Intellisense question CrossPage Posting and the How Do I Webcast Master Page - File References |
|||||||||||||||||||||||