I faced this issue with web explorer bar
Placing a button inside the template and issuing a post back action a format exception is thrown
It seems because the button control id is not included in the post back action the exception is thrown
<
Height="148px" onitemclick="webexplorerBar_ItemClick" EnableTheming=True
AnimationEquationType="Linear" BorderWidth="5px" MaxGroupHeight="30px">
<groups><ig:ExplorerBarGroup GroupContentsHeight="" Text="Test Group" Expanded=true ><Items><ig:ExplorerBarItem TemplateId="NewsTemp" ></ig:ExplorerBarItem></Items></ig:ExplorerBarGroup><ig:ExplorerBarGroup GroupContentsHeight="" Text="Test Group 3" Expanded ="true">
<Items><ig:ExplorerBarItem TemplateId="NewsTemp" Expanded="false" >
</ig:ExplorerBarItem></Items></ig:ExplorerBarGroup></groups><templates>
<ig:ItemTemplate ID="webexplorerBarTemplate1" runat="server" TemplateID
="NewsTemp"><Template><asp:Button ID="Button2" runat="server" Text="Button"></asp:Button>
</Template></ig:ItemTemplate></templates></ig:webexplorerbar>
I was able to overcome this behavior by letting the button call a javascript function instead of server code and then calling __doPostBack and passing the control id
function doButtonClickEvent(){if(Page_ClientValidate()) __doPostBack('mycontrol id', ''); }
and at my page page load event
if(IsPostBack){
string targetControl = Page.Request.Params.Get("__EVENTTARGET");
if (targetControl == "mycontrolid") myButton_OnClick();
}
Hi Sameh,
If you need any further assistance on the matter please do not hesitate to ask.