Hi Team,
My Requirement is to open PDF File in Rad Panel Item. When I do it from design mode it is working fine, but I am unable to add Iframe from code behind.
When I used Iframe from design mode :
<telerik:RadPanelBar ID="radSample" runat="server">
<Items>
<telerik:RadPanelItem>
<ContentTemplate>
<iframe id="sample123" runat="server" src="~/UpLoadedImages/abc.pdf"></iframe>
</ContentTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>
when I used like this it is working fine and pdf is opening in Iframe but now i need to add rad panel items dynamically,
but as per my requirement i may have add number of rad panel items so for that,
count = no. of items;
foreach(int i=0 ; i < count; i++)
{
RadPanelItem myItem= new RadPanelItem();
System.Web.UI.HtmlControls.HtmlGenericControl Iframe1 = new System.Web.UI.HtmlControls.HtmlGenericControl();
Iframe1.Attributes["src"] = "~/UpLoadedImages/abc.pdf";
myItem.Controls.Add(Iframe1);
radPnlBar1.Items.Add(myItem);
}
Now IFrame is adding like a span tag and not working as expected.
Can you help me how to add Iframe control to Rad Panel Item dynamically....
Thanks in Advance..
Santhosh.G,
My Requirement is to open PDF File in Rad Panel Item. When I do it from design mode it is working fine, but I am unable to add Iframe from code behind.
When I used Iframe from design mode :
<telerik:RadPanelBar ID="radSample" runat="server">
<Items>
<telerik:RadPanelItem>
<ContentTemplate>
<iframe id="sample123" runat="server" src="~/UpLoadedImages/abc.pdf"></iframe>
</ContentTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelBar>
when I used like this it is working fine and pdf is opening in Iframe but now i need to add rad panel items dynamically,
but as per my requirement i may have add number of rad panel items so for that,
count = no. of items;
foreach(int i=0 ; i < count; i++)
{
RadPanelItem myItem= new RadPanelItem();
System.Web.UI.HtmlControls.HtmlGenericControl Iframe1 = new System.Web.UI.HtmlControls.HtmlGenericControl();
Iframe1.Attributes["src"] = "~/UpLoadedImages/abc.pdf";
myItem.Controls.Add(Iframe1);
radPnlBar1.Items.Add(myItem);
}
Now IFrame is adding like a span tag and not working as expected.
Can you help me how to add Iframe control to Rad Panel Item dynamically....
Thanks in Advance..
Santhosh.G,