Button's text

J

Jenny

Hi,

I'm using a button, generated in the code behind:

Dim button As New System.Web.UI.HtmlControls.HtmlButton
button.Attributes.Add("value", "I'm a Button")
button.Style.Add("width", "100px")
Page.Controls.Add(button)

The width statement works properly but setting the text on
the button doesn't. I also tried button.Style.Add(("value",
"I'm a Button") but it also not working?

What I'm doing wrong?

Thanks for help

Jenny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top