-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Am2pm4
Message 1 in Discussion

Hi ,
   I am dynamically creating a linkbuttons and I want that on click of those 
dynamically created LinkButtons an event should be fired . I am not able to 
fire the event . This is my code : 

Please help : 

This is how I am creating linkbuttons 

   System.Web.UI.WebControls.LinkButton objLinkButton = new LinkButton();
                        objLinkButton.Text = objDocInfo.Documentname.ToString();
                        objLinkButton.ID = objDocInfo.Id;
                        objLinkButton.Click += new 
EventHandler(LinkButton_Click);
                        oLinkRow.Cells[0].Controls.Add(objLinkButton);
                        Display_Content.Rows.Add(oLinkRow);


-------------------------------------------------------------------------------

this is how i have declared the event 

  void LinkButton_Click(Object sender,System.EventArgs e)
    {
        LinkButton lb = (LinkButton)sender;
        Response.Write(lb.ID.ToString());
        
    }


-----------------------------------------------------------------------------
This is how i am trying to call it on page_load 

 protected void Page_Load(object sender, EventArgs e)
    {
            objDocumentum = new Documentum();
        
            if 
(sender.GetType().Equals(typeof(System.Web.UI.WebControls.LinkButton)))
            {
                LinkButton_Click(sender, e);
            }
        
    }

---------------------------------------------------------------------------

I am not able to capture the click and pass accordingly to the event 

can somebody help me out in this ? 







-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to