473,327 Members | 2,016 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,327 software developers and data experts.

Button control ID and Text

In the Button control, how can I keep the ID and Text attirbute the same? Of
course I can type the same thing for attributes. But I want to avoid
repeated typing.

<asp:Button ID="Calculate" runat="server" OnClick="Button_Click" />

TNK
Mar 31 '06 #1
2 1211
They are two seperate properties, and they have to be set seperately. If
you want to ensure they are the same thing i would sugest setting them
programatically from the same variable, but this is just a shot in the dark
as you havn't given any details of what you are doing.

"Web learner" wrote:
In the Button control, how can I keep the ID and Text attirbute the same? Of
course I can type the same thing for attributes. But I want to avoid
repeated typing.

<asp:Button ID="Calculate" runat="server" OnClick="Button_Click" />

TNK

Mar 31 '06 #2
within your form load event ...

Calculate.Text = Calculate.ID

"Web learner" <be******@learning.edu> wrote in message
news:ul*************@TK2MSFTNGP09.phx.gbl...
In the Button control, how can I keep the ID and Text attirbute the same?
Of course I can type the same thing for attributes. But I want to avoid
repeated typing.

<asp:Button ID="Calculate" runat="server" OnClick="Button_Click" />

TNK

Mar 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Aymer | last post by:
i created a new button object. how do i attach an event on it? thanx for your help. Dim cc As ColorConverter = new ColorConverter() Dim b = new button() b.ID = "SelectedDate" b.BorderStyle...
2
by: Buddy | last post by:
Hello, Can someone point me to some example code that shows how to paint the text in a button control. I basically want to reposition the text so it does not wrap.
8
by: Zelin Lu | last post by:
Hello, All I am building two user controls and dynamicly load one them into a PlaceHolder. But the button on the user control doesn't work fine. I need to click twice to fire the event? ...
2
by: strout | last post by:
It's a pain to create each button with 2 images: button_on.gif button_off.gif I am looking for a control that have on/off two states, preferred as BACKGROUND images and with button text on it. ...
1
by: Martin | last post by:
Hi, I have produced a custom server control that simple outputs a row of 26 buttons, one button for each letter of the english alphabet. now what I would like to do is catch the button click...
3
by: G Namx | last post by:
Hi, We have a usercontrol with a number of controls on it. One being a radio button and one being a button. When we set button.enabled = false the click event of the radio button is being...
7
by: MgGuigg | last post by:
Hello all, This is my first time posting a question to this forum, so here is hoping I am following protocol. I am scraping the rust off my old Basic programming skills, and have just recently...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
0
by: David | last post by:
Hello all. I am trying to implement my first server control and have run into two problems that I cannot solve. I need the assistance of someone with more experience. My goal was to create an...
5
by: gregarican | last post by:
There is a C# CTI app I'm working on using Visual Studio 2005 at revision level 8.0.50727-7600. I need a couple of Windows Form Button controls to emulate line buttons on a telephone. So I went to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.