Click here to Skip to main content
15,895,084 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: dropdown list Pin
sudhanvag25-Jan-09 2:32
sudhanvag25-Jan-09 2:32 
AnswerRe: dropdown list Pin
CooperWu25-Jan-09 2:38
CooperWu25-Jan-09 2:38 
QuestionReading javascript modified value from a readOnly TextBox [modified] Pin
SmartSpider24-Jan-09 9:56
SmartSpider24-Jan-09 9:56 
AnswerRe: Reading javascript modified value from a readOnly TextBox Pin
Not Active24-Jan-09 13:23
mentorNot Active24-Jan-09 13:23 
GeneralRe: Reading javascript modified value from a readOnly TextBox Pin
SmartSpider25-Jan-09 7:54
SmartSpider25-Jan-09 7:54 
GeneralRe: Reading javascript modified value from a readOnly TextBox Pin
Not Active25-Jan-09 8:08
mentorNot Active25-Jan-09 8:08 
QuestionHow to create an array of buttons then access attributes in event handler Pin
scjsb24-Jan-09 7:48
scjsb24-Jan-09 7:48 
AnswerRe: How to create an array of buttons then access attributes in event handler Pin
sudhanvag25-Jan-09 7:41
sudhanvag25-Jan-09 7:41 
scjsb wrote:
The problem is the event handler never triggers.


Check this out.

public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ButtonArray();
    }

    protected void ButtonArray()
    {
        try
        {
            for (int i = 0; i < 14; i++)
            {
                Button new_button = new Button();
                new_button.ID = "btn" + Convert.ToString(i);
                new_button.Text = "Button" + Convert.ToString(i);
                //new_button.Click += new EventHandler(btn_Click);
                new_button.Click += new EventHandler(new_button_Click);
                panelLineA.Controls.Add(new_button);

            }

        }
        catch (Exception ex)
        {
            lblStatus.Text += ex.Message.ToString();
        }
    }

    void new_button_Click(object sender, EventArgs e)
    {
        int btnIndex = Convert.ToInt32(((Button)sender).ID.Substring(3, 1));
        lblStatus.Text = "Button " + btnIndex + " was pushed." + ((Button)sender).ID;
    }
}


Cheers,
Sudhanva
Questioncan't get to display image in gridview Pin
Meax24-Jan-09 5:58
Meax24-Jan-09 5:58 
AnswerRe: can't get to display image in gridview Pin
CooperWu25-Jan-09 2:28
CooperWu25-Jan-09 2:28 
QuestionHelp! ASP.NET cannot do simple arithmetic... Pin
Ben Jern24-Jan-09 5:02
Ben Jern24-Jan-09 5:02 
AnswerRe: Help! ASP.NET cannot do simple arithmetic... Pin
Ben Jern24-Jan-09 5:38
Ben Jern24-Jan-09 5:38 
AnswerRe: Help! ASP.NET cannot do simple arithmetic... Pin
Colin Angus Mackay24-Jan-09 7:25
Colin Angus Mackay24-Jan-09 7:25 
GeneralRe: Help! ASP.NET cannot do simple arithmetic... Pin
Ben Jern24-Jan-09 14:26
Ben Jern24-Jan-09 14:26 
QuestionRestricting session sharing between multiple tabs in a browser. Pin
Praveen_S24-Jan-09 2:53
Praveen_S24-Jan-09 2:53 
AnswerRe: Restricting session sharing between multiple tabs in a browser. Pin
CooperWu24-Jan-09 4:16
CooperWu24-Jan-09 4:16 
Questionhow to add feature of changing color of text giving wide range of color to user in softare template creator using asp .net Pin
teju gadekar24-Jan-09 1:35
teju gadekar24-Jan-09 1:35 
GeneralRe: how to add feature of changing color of text giving wide range of color to user in softare template creator using asp .net Pin
CooperWu24-Jan-09 4:19
CooperWu24-Jan-09 4:19 
QuestionAjax and Asp.net Pin
ahawari0924-Jan-09 1:34
ahawari0924-Jan-09 1:34 
AnswerRe: Ajax and Asp.net Pin
Colin Angus Mackay24-Jan-09 2:49
Colin Angus Mackay24-Jan-09 2:49 
QuestionViewing aspx pages Pin
Ha ha ha ha ha ha ha ha24-Jan-09 1:09
Ha ha ha ha ha ha ha ha24-Jan-09 1:09 
AnswerRe: Viewing aspx pages Pin
Colin Angus Mackay24-Jan-09 1:13
Colin Angus Mackay24-Jan-09 1:13 
GeneralRe: Viewing aspx pages Pin
Ha ha ha ha ha ha ha ha24-Jan-09 1:24
Ha ha ha ha ha ha ha ha24-Jan-09 1:24 
GeneralRe: Viewing aspx pages Pin
Colin Angus Mackay24-Jan-09 1:50
Colin Angus Mackay24-Jan-09 1:50 
AnswerRe: Viewing aspx pages Pin
Abhijit Jana24-Jan-09 2:10
professionalAbhijit Jana24-Jan-09 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.