- Joined
- Feb 8, 2011
- Messages
- 3
- Reaction score
- 0
I am having user control multiple instances on same page. user control is embeded with javascript functionality.
for eg.
<script type="text/javascript" language="javascript">
var Global_variable1,Global_Variable2;
function CommonFunction(){
}
</script>
i am calling this function from .ascx.cs like this
Me.Page.ClientScript.RegisterStartupScript(Me.GetType(), "FunctionCall","commonfunction();");
when in .aspx page (i.e in parent page ) multiple instances of the user control are loaded then it get override by 1st user control instance
i want all global variables & commonfunction() to be called for each instacne of user control
For ex. Usercontrol1,usercontrol2 are two instances in the parent page
then function should get called as Usercontol1.CommonFucntion(),Usercontrol2.commonFunction()
For global variables UserControl1.GlobalVariable1,Usercontrol2.Globalvariable1 etc
How to do this ?.please help me
Thanks & Regards,
Anirudha Deshpande
for eg.
<script type="text/javascript" language="javascript">
var Global_variable1,Global_Variable2;
function CommonFunction(){
}
</script>
i am calling this function from .ascx.cs like this
Me.Page.ClientScript.RegisterStartupScript(Me.GetType(), "FunctionCall","commonfunction();");
when in .aspx page (i.e in parent page ) multiple instances of the user control are loaded then it get override by 1st user control instance
i want all global variables & commonfunction() to be called for each instacne of user control
For ex. Usercontrol1,usercontrol2 are two instances in the parent page
then function should get called as Usercontol1.CommonFucntion(),Usercontrol2.commonFunction()
For global variables UserControl1.GlobalVariable1,Usercontrol2.Globalvariable1 etc
How to do this ?.please help me
Thanks & Regards,
Anirudha Deshpande