How to Get Image content In Rad Window

2 posts, 0 answers
  1. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 25 Jun 2013 Link to this post

    Hello folks,
    I have requirement like these.I have rad-window inside I have following code .

    <telerik:RadWindow ID="rdwndwPreviewCheck" VisibleOnPageLoad="false" Title="Check Preview">
                <asp:Image ID="chkImage1" runat="server" ImageUrl="~/CheckPreview.aspx" />
                <br />
                <br />
                <table style="width: 100%;">
                    <tr align="center">
                        <td style="width: 580px;">
                            <telerik:RadButton ID="rdPrint" runat="server" Text="  Print"   Style="position: relative;
                                left: 90px;"  OnClick="print"    >
                                <Icon SecondaryIconCssClass="rbPrint" SecondaryIconRight="4" SecondaryIconTop="4" />
                            <telerik:RadButton ID="CloseRadPrintWindow" runat="server" Text="Close" OnClientClicked="closeMyRadWindow"
                                Style="position: relative; left: -185px;">

    I want to access the  image content  inside the rad-window....through code behind technique  and  I need to assign  that Image  to  some other image .. using the  code behind technique ..after that I want to convert the Image into Byte[]
    the image url is not a static one and it is dynamic based on requesting the page we getting some Image .jpeg from that page.
          <script type="text/javascript">
                function printIt() {
                    var win ='', 'popup', 'location=1,status=1,scrollbars=1,width=800,height=600');
                    if (win) {
                        var imageControl = document.getElementById('<%=chkImage1.ClientID%>').src;
                        win.document.write('<img src="' + imageControl + '">');
                    return false;
    the above code  , I  used to  Display Image in the  ..rad-window..But ..same image I want to access code code behind technique and also I need to convert to Byte[] stream.
  2. Marin Bratanov
    Marin Bratanov avatar
    5809 posts

    Posted 28 Jun 2013 Link to this post

    Hi Sairam,

    The controls from the RadWindow's ContentTemplate are available directly in the code-behind from the page;s class, as can be seen by examining this demo's code  and this help article

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top