Modal that opens an IFRAME (umbraco) - c#

I'v got a problem when opening a Modal window that loads a JFrame.
The file loaded in the JFrame is a aspx file with a tag of /umbraco/controls/Tree/TreeControl.ascx. The modal loads and any text i put in is loaded but the TreeControl will not load. Iv used this ascx file in other places and it works greate if I load it via a normal page call. If you ar not familiar with umbraco Tree. It's basiclly a jquery tree that loads xml nodes.
Tried to copy code here. But couldnt get formatting to work.
Thx for any help
Best Regards
Marthin

This is no longer a problem for me with the new version of Umbraco 4.5

Related

Page tabs loads too slow - umbraco 6

I created some pages on umbraco and it works correctly. But i added some datagrids to main page and now, main page's tabs is loading too slow because umbraco is trying to load all data of page on tabs on first call.
So my question is can i load only selected tab on pages? Like lazy load? For example; If i click to first tab, load that data. After click second tab, load data of second tab. Because the standard load of data system is too slow.
Thanks!
ps: Im too newbie on umbraco. So i didnt create custom tabs...etc. Just i created from umbraco dashboard template settings.
As far as I'm aware, there's no way to lazy-load tabs on an Umbraco node. At least that's not provided as functionality.
We've often had a similar problem of a node/page having too much on it (a lot of rich text editors, with each of them loading TinyMCE), and the way around it for us was to pull this content out into child nodes.
By this, I mean that the main page content stays in the page node, but then you could create new document types that are created as children of the content node. You could then use XSLT/Razor to pull in the content stored in these child nodes to be published onto the main content page. By doing this, you'd still have all the content on the page, but it would be split up into multiple nodes, with each of them loading nice and quickly.

Cannot export content of ultrawebgrid to excel spreadsheet from WebDialog

I'm using window.showModalDialog to open a modal window using Javascript. I have to include this line in the < HEAD > html of the modal window: <base target=_self> because whenever that page posted back, it would spawn off a new window!!
In this Modal Window I need to have a File Download functionality. The problem is that using the File Download dialog don't popup, but if I remove the the File Download dialog appears but then again, another window shows off. Is there by any chance that I can disable <base target_self> while I am downloading the content of my grid? By the way, I am using Infragistics UltraWebGridExcelExporter for this.
Thanks everyone.
As I mentioned this is a well known problem. One possible solution (I haven't got a chance to try it, but it seems logical) for the button that initiates download onClientClick try adding following JavaScript code:
document.getElementsByTagName("base")[0].setAttibute("target","")
it will change base target to blank, but only for duration of download.

Loading html page from a template on the computer

I am working with a C# on visual studios.
What I would like to know is if it is possible to have a html template loaded from a directory on my computer. Then every time I load up my code it will load up the .html template automatically.
Yes there is a way, not suggested but exist. You can use this code to include the file, inside your asp.net page.
<!--#include file="template.htm"-->
What is dose is that is load this htm file and show it on the place that you have place this declaration. Also you must know that this file can not contain anything dynamically. This is a command code that comes from the old asp script code, and still work on asp.net
So I can not call it as template. If you wish to make something like a real template you must use a master page. Using a master page is far better, and you just copy paste your htm code inside the master page and there you have it.
relative: http://triaslama.wordpress.com/2008/11/19/how-to-include-file-in-aspnet-pages/

How can I upload files asynchronously on ASP.NET?

I've been looking for a way to achieve this behavior and I found this sample project.
The trick in this project is that it changes the form target to an iframe created on the fly.
So far so good, I can get the byte[] on the server-side. But I need to change an image preview after the file is uploaded.
How can I get the iframe to update the main page? Would I have to save it on a file on the disk, make a javascript callback to change the image url? Is there another way to do this? What's recommended?
This control suggested by vorrtex actually causes a full page postback, am I missing something or is it the correct behavior?
I recommend you to use AsyncFileUploader and UpdatePanel. You have to save file on the disk but you can use C# for changing imageUrl.
Add a <script> block to the page that gets loaded in the <iframe> that interacts with the parent page and updates whatever you need to.
You can use the project mentioned below to preview the image before uploading. Working sample is also attached.
http://www.dotnetspider.com/resources/40858-Preview-Image-before-uploading-using.aspx
This uses AjaxControlToolKit's AsyncFileUploadControl and HTTPHandler to upload the image.

Silverlight getting loaded again and again in Firefox

I am using Silverlight.CreateObject function to create a object tag with a xap which is dynamic i.e. it does it on a click on something. And when u click that back again it gets disappeared. When u click it again, it should show the XAP again without loading it again(as it has been downloaded once).
All works fine in IE. But in Firefox when I click it again, it starts loading it again.
In fiddler it is showing Private Cache for both IE and Firefox.
Can someone help me?
In firefox, when you hide a DOM element that contains a SL app, the SL application is re-initialized. we used jQuery to remove the object tag, then hide the element:
$("#element object").remove();
$("#element").hide();
...before you do show() you have to re-create the SL object tag. above applies also when replacing a DOM element with $.ajax loaded content.
Why are you adding this level of complexity? Why aren't you just setting the visibility style of the HTML DIV or OBJECT tag?
Could you try using the Silverlight.js 2.0 version from Microsoft. That might solve the caching issue?

Categories

Resources