Loading a RadWindow from an embedded resource page

7 posts, 0 answers
  1. koffiemokje
    koffiemokje avatar
    6 posts
    Member since:
    Jun 2007

    Posted 14 Feb 2008 Link to this post

    Hi Telerik support,

    Is it possible to get the memorystream to an embedded aspx page and have that be the page for a RadWindow?

    If so, how do I do this?

    Thanks in advance,
    Vincent
  2. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 15 Feb 2008 Link to this post

    Hi koffiemokje,

    You can think of RadWindow in the same manner as for an IFRAME or a browser window (opened with window.open).

    The window needs a reference to a URL, and you need to set this URL to its NavigateUrl property.

    So, a simple approach whould be to use a regular ASPX page, and send the stream content in its Page_Load method

    E.g. in your RadWindow declaration set something like  NavigateUrl = "Stream.aspx?pageid=5"

    //In your Stream.aspx do something like
    protected void Page_Load(object sender, EventArgs e)
    {
        //Determine what content to send back, you can use the GET parameter pageid to determine content
        //if (Request["pageid"] != string.Empty) .... load particular content
        Response.Write(streamContent);
        Response.Flush();
        Response.End();
    }




    Greetings,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 20 Mar 2008 Link to this post

    What if one wanted to host the ASPX page for the window as an embedded resource in the composit control in which the window resides?

    String based URLs to the resources are short on flexibility. 
    The window would be far more useful in dynamic environments if the developer could generate the ASPX on the fly and add it to the window or if an embedded resource can be assigned.

    I've noticed way too many properties are string based references in the control set.
    This leaves control developers in the cold often times.

    Do you have plans to implement a more flexible functionality in the future?
  5. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 21 Mar 2008 Link to this post

    Hello Doug,

    I am not sure I understand the question. It seems that you have more of a desktop/WinForms development background, is that correct?

    The web-based environment forces a diffeernt programming paradigm, as it clearly separates server-side functionality from client-side functionality. There are also two very distinct environments - the server environment with its APIs and the client browser.

    While ASP.NET and other technologies aim to bridge that gap, developing for the web requires to consider how browsers and the protocols they use work.

    With this respect, certain features are not possible to implement at all, or in a manner logical for a desktop environment.

    In the case of RadWindow, as noted in our original answer - a RadWindow cannot do more than what an IFRAME can do, as it is basically a moveable iframe [when rendered on the client].

    We hope this information will be useful to you,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 21 Mar 2008 Link to this post

    Nope, I'm strictly browser dev only.
    I've been using your controls at various companies for years, actually.
    Every time I join a new organization, I buy your controls...

    My main focus with my current position, is custom and composite control development.

    Here's the problem.  If a custom control developer wishes to include a Prometheus window (for example) in their control payload, they must also provide a URL to a page to be displayed within the window.  Since they're developing in a Webcontrol derived class their goal would be to encapsulate everything needed for the control, so that the consumer of the control need not create additional pages as companion to this custom control. 

    IOW, as a custom control developer, I don't have the luxury of using the window, because I can not encapsulate everything needed to make it work, namely the aspx page to be displayed within the window.

    What is needed is the ability to create an embedded aspx page that is held in the assembly, and to use the WebResource class to access it.  This is disallowed, because your property requires a string based URL.  Instead I must go through the pain of creating a virtual host to serve up the embedded resources.

    This is just one example I've run into, where the Prometheus controls were not designed with composite control developers in mind.

    That's about as clear as mud?  :-)


  7. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 24 Mar 2008 Link to this post

    Hello Doug,

    You can use RadDock to display embedded controls (not aspx-es) - RadDock is similar to RadWindow in the way that it can be moved (and resized - coming in a couple of week) around the page.

    As already noted - RadWindow should be used to load fully external pages - just like when using an iframe or window.open.

    Since you embed an aspx page, and you want to refer to it on the client, I believe it is still possible to implement - by obtaining the WebResource URL by quering the "system" to return it. If you send us a simple working project using an embedded ASPX page, we will do our best to provide you with a generic mechanism to set a URL to RadWindow by using the name of the embedded page to query the system.



    Best regards,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 24 Mar 2008 Link to this post

    I actually thought of that, using the RadDock, but I've had lots of difficulty with the dock working correctly.  I'd have to isolate the problems and send you a project, but essentially the dock doesn't play nice nice with AjaxMgr.

    For my current project, I actually used the ToolTip to acheive what I needed to for this particular control.  But a window example would be great.

    As soon as I have time, I'll isolate a project and post it.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017