how I can extract the text of a Button?
hello I need to know how I can Extract the text of a Button and that event use it for many Buttons like A to Z
something like this
protected void btnText_Click(object sender, EventArgs e)
{
string Char= Button.Text.ToString(); //
Label1.Text = Char.ToString();
}
and on the aspx is like this
<asp:Button ID="btnA" runat="server" Text="A" onclick="btnText_Click" class="btn-mini"/> <!--this event is for use on all the buttons-->
<asp:Button ID="btnB" runat="server" Text="B" onclick="btnText_Click" class="btn-mini"/>
<asp:Button ID="btnC" runat="server" Text="C" onclick="btnText_Click" class="btn-mini"/>
thank you very much!
Last edited by light882; September 20th, 2013 at 10:55 AM..
|