PASSING VALUES TO WIDGET FROM MAIN PAGE. IS IT POSSIBLE???

Mar 19, 2009 at 9:30 AM
Edited Mar 19, 2009 at 9:39 AM
I AM TRYING TO PASS THE VALUES FROM MAIN PAGE TO WIDGET.

I HAVE CREATE THE LABEL IN WIDGET AND THROUGH FIND CONTROL TRYING TO FIND THAT LABEL BUT ITS NOT WORKING.


//--------------------

var

 

widget = LoadControl(WIDGET_CONTAINER) as WidgetContainer;

 

 

 widget.ID =

 

 

"WidgetContainer" + instance.Id.ToString();

 

 widget.IsFirstLoad = isWidgetFirstLoad(instance);

widget.WidgetInstance = instance;

widget.Deleted +=

 

 

new Action<WidgetInstance>(widget_Deleted);

 

 

 

 

//((Label)widget.FindControl("lblTotalApps")).Text = "10000";

 

 

 

 

try{panel.Controls.Add(widget);}

 

 

 

//--------------------

I WANA ASIGN VALUE TO LABLE ("1000")  BEFORE ADDING THIS WIDGET IN PANEL...
CAN ANY ONE HELP ME! :(

THANKS