c# - I have added the child controls on repeater control. that child control not firing the event -


I have created the wizard control, along with that I have made the repeater control. There are three radio buttons in this repeater control. Dynamically created. I want to fire the investigation of a radio button.

Find the code:

  ** panel objPanel = (panel) wizard 1. Magicstep [Wizard 1 ActiveStepIndex] .Controls [5]; Repeater reptrAddQuestion = new repeater (); ReptrAddQuestion.ID = "reptrAddQuestion" + (count-1); String [] obj = new string [2]; ReptrAddQuestion.Visible = true; ReptrAddQuestion.DataSource = obj; ReptrAddQuestion.DataBind (); ReptrAddQuestion.EnableViewState = true; Int control Idvalue = (Calculate - 1) + 1; {Radioboton R.Dobboton = new radio button (for; index; index; lt; = reptrAddQuestion.Items.Count - 1; index ++); RdoBtn.AutoPostBack = True; RdoBtn.ID = "RdoBtn" + controlIdValue.ToString (); RdoBtn.CheckedChanged + = New System.EventHandler (RdoBtn_CheckedChanged); RdoBtn.EnableViewState = true; ReptrAddQuestion.Controls.Add (RdoBtn); ControlIdValue + = 1; } ObjPanel.Visible = true; ObjPanel.Controls.Add (reptrAddQuestion); ** Public Zero RdoBtn_CheckedChanged (Object Sender, EventArgs E) {}  

thanks in advance for this help Regards, Devathithan S.

It depends on which control you are building.

If you want to control controls backback and control events, you will need to create them in the "OnInit" or "OnPreInit" function pages.

If you are Page_loading these controls or later, then very long. Control events will not stop or users will not retain changes, as the postback information has already been processed.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -