Hello techz,,,,,
I am using some user control for my dnn project.
All the child user controls are loaded to a main user control and events in child control (suppose image button click) is not firing ... only page_load in the child user control is working ... none of the other events are working....
when i click the image button in the child user control(the control of execution is not getting inside the button click event), the debugger getting back to main user control page_load event .......
how can i able to get events in child user controls .....
<!-- / message --><!-- sig -->
CODE INSIDE THE MAIN USER CONTROL
protected void Page_Load(System.Object sender, System.EventArgs e)
{
try
{
string sUserID = "ABCD";
string sDevKey = "EFGH";
if (!Page.IsPostBack)
{
rlSearchObj = LoadControl("~/DesktopModules/rlProductSearch/
rlSearch.ascx", new object[] { sUserID, sDevKey });
plcHold.Controls.Add(rlSearchObj);
}
else
{
("~/DesktopModules/rlProductSearch/rlProductResults.ascx", new object[] { sUserID, sDevKey });
if (Session["PageToLoad"].ToString() == "rlProductResults")
{
rlProductResultObj = LoadControl("~/DesktopModules/rlProductSearch/rlProductResults.ascx", new object[] { sUserID, sDevKey });
}
}
}
CODE INSIDE THE RLSEARCH.ASCX (CHILD CONTROL, LOAD INSIDE THE ABOVE SAID CONTROL)public partial class rlSearch : PortalModuleBase
{
string sUserID = string.Empty;
string sDevKey = string.Empty;
#region Event Handlers
public rlSearch()
{
}
public rlSearch(string sUser, string sDevK)
{
sUserID = sUser ;
sDevKey = sDevK;
//InitializeComponent();
imgbtnSearch.Click += new ImageClickEventHandler(imgbtnSearch_Click);
}
protected void Page_Load(System.Object sender, System.EventArgs e)
{
try
{
Session["PageToLoad"] = "rlProductResults";
if (!Page.IsPostBack)
{
fillBrandName();
}
}
catch (Exception exc)
{}
}
void fillBrandName()
{
}
protected void imgbtnSearch_Click(object sender, ImageClickEventArgs e)
{
this.Visible = false;
}
why the imgbtnSearch_Click is not firing ........ ?