Showing posts with label load. Show all posts
Showing posts with label load. Show all posts

Wednesday, March 28, 2012

PageFlakes.com Initial Load

Does anyone know how PageFlakes.com does the initial "Loading..." progress when you first go towww.pageflakes.com? I would like to be able to set a page to show a "Loading..." progress panel when users first go to the page.

I second that request - it may be flash, but it certainly is cool.

Also cool is the little dashes when you move a control around (denoting the size).

I also really wish the Atlas Tools team would come up with an RSS reader that was as robust as PageFlakes.


Well as far as I understood Pageflakes.com was done in Atlas that's why I was asking how they did the initial "loading" because I was hoping someone may be able to explain how to do something like that with Atlas.
I'm pretty sure they're using an UpdateProgress control with an animated GIF file. I'm also pretty sure that the GIF is included in the Atlas sample applications.
But how do you use an UpdateProgress control with the initial load of a page and not a PostBack--also, how did they make it so the UpdateProgress control replaces all of the UpdatePanels while loading?

Look at my thread here:

http://forums.asp.net/thread/1256936.aspx

pageLoad() javascript function

I understand that a script with the pageLoad() function is a way to hook into the client side load event.

That works great if you are working in the .aspx page itself. What if you're in a user control and want something to hook into the pageLoad() event on the client?

I could use Page.RegisterClientScriptBlock() to inject the JS into the page, but that would overwrite any other function that might be in the master page, content page or other user controls.

Isn't there a way to just add an event to the page load on the client side and not worry about conflicting with other code?

Thanks,

John

Can you give an example of what you're trying to do?


I'm not sure I understand your problem, but if your user control inherits from Sys.UI.Control it's initialize method will be called when the page loads.

You can add your own pageLoad() handler by usingSys.Application.add_load().


HI,

I could use the page_load server event, but that would delay the rendering of the entire page until this process is complete. The effect I am looking for is to render a page so the user has something to look at. Then, when theclient on_load event fires, initiate some long running tasks that can take place while the user already has something to look at.

Thanks,

John


Sys.Application.Load is the client side event, not server side. Take a look at the documentation I linked. That's the event that pageLoad() calls implicitly.


Hi,

In the User control , write this function ,
<script>
function IAMIntheUserControl(object,eventArgs) {
}
</script>

register this script with RegisterClientScriptBlock.

Sys.Application.add_load( IAMIntheUserControl );

PageMethod Static Ajax WebService and User Controls

I have a page HostPage.aspx, which is a generic hostpage that will dynamically load Web User Controls at runtime, according to the needs of various other users. Those other Web User Controls will be created by the other users, such that they can put anything they like in that Web User Control, and it will be dynamically populated and put in the HostPage.aspx. They will always use HostPage.aspx, they cannot edit it. This is working as-is, and everything is great.

Now, some users want to put AJAX functionality in their User Controls, such that the HostPage.aspx will contain their User Control, the User Control will contain an UpdatePanel, a ScriptManager, etc.

To enable page methods, we have to set the EnablePageMethods="true" on the scriptmanager, and have to declare a static method *somewhere*. The requirements are such that we cannot be declaring these static methods in the HostPage.aspx, because it cannot know what the controls, and therefore static methods, are until runtime. On the other hand, if we declare these static methods in the User Control, it's not defined in the HostPage, and AJAX PageMethod callbacks fail ("Method myMethod is not defined"), because the page doesn't know of it's existence.

1. Has anyone tried to do something similar to this, namely having AJAX controls in a User Control, which is hosted in a page, yet also needs to use the Page Methods, yet cannot declare them in the page (I know, that's pretty specific).

2. Any ideas on how this might be accomplished?

I'm thinking of using Reflection or DynamicMethod (http://msdn2.microsoft.com/en-us/library/system.reflection.emit.dynamicmethod.aspx) to make this happen, such that at runtime, the page will examine its child controls for any static methods with the ScriptService attribute, and then dynamically create a static method on itself with the same name, calling the child, but that is rather involved and I fear the performance risk of this (if this whole idea is even possible). Plus, the generated method wouldn't exist until after the controls exist, and I'm not sure where that falls in relation to the timing of the AJAX extensions (looking for the MethodName). It might be (probable) that the handler is looking for the method even before the controls are initialized, in which case that idea won't fly.

You can't do that... as described here (http://www.singingeels.com/Articles/Using_Page_Methods_in_ASPNET_AJAX.aspx) Page Methods are only on pages :)

But you can get what you want if you make your user control register a "web service" as in this article:http://www.singingeels.com/Articles/Consuming_Web_Services_With_ASPNET_AJAX.aspx

If your users aren't able to add webserivces (I really don't know the situation your building)... then they can register a regular old "AsyncPostBack" and wire it up themselves (sorry, no article on that yet).


Right, I understand completely the concept of PageMethods, that they are on pages, etc. That's why this is a bit of a tricky spot.

I guess what I'm looking for is whether anyone has come up with anything clever to get around this situation (PageMethods from a Usercontrol). The usersare free to create and consume their own webservices, if they like, but if possible, I would like to give them this functionality for this situation.


OK, I believe it's Page.ClientScript.RegisterAsyncPostBack or maybe ScriptManager.RegisterAsycnPostBack ( I can't remember )... either way, it'll post back to the page... and ultimately the user control, and fire an event (on the user control).

That'll work just like the page methods... (a little better actually for what you're doing)

Saturday, March 24, 2012

Panel is resizing when it is used with RoundCornerExtender.It looks page load twice

hi

I have a master page , in that i have placed three panels and foreach panel i have a RoundedCornersExtender for round corners.problem iswhen i run the page it loads two times. I think that is because of roundcornerextender,when the page loads the panel looks to be resizing and it causes the page loads twice

when i remove the RoundedCornersExtender from the panel,it worksfine and load only once.but i want round corner panel for my masterpage to look good.


if anybody having the solution for this,plz advice me.Thanks in advance

This is my master page code

<%@dotnet.itags.org. Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link href="http://links.10026.com/?link=Hq_StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#4B5C82"><%--"#4B5C82"--%>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<table cellspacing="5" cellpadding="4" width="95%" align="center" id="mastertable">
<tr>
<td colspan="2">
<asp:Panel ID="panel1" runat="server" Width="100%" BackColor="#ffffff" >
<!--#include file="header.aspx"-->
</asp:Panel>

</td>
</tr>
<tr >
<td width="20%" height="100%" valign="top" >
<asp:Panel ID="panel2" runat="server" Width="100%" BackColor="#ffffff" Height="100%">
<table cellpadding="3"><tr><td>
<!--#include file="leftnav.aspx"-->
</td></tr>
</table>
</asp:Panel>
</td>
<td width="80%">
<asp:Panel ID="panel3" runat="server" Width="100%" BackColor="#ffffff" Height="100%">
<table cellpadding="3"><tr><td>
<asp:contentplaceholder id="middleContent" runat="Server"></asp:contentplaceholder>
//Content pages
</td></tr>
</table>
</asp:Panel>
</td>

</tr>
<tr>
<td></td>
<td id ="footer">
<!--#include file="footer.aspx"-->
</td>
</tr>
</table>
<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender1"runat="server" TargetControlID="Panel1" Radius="8"BorderColor="#ffffff">
</ajaxToolkit:RoundedCornersExtender>
<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender2"runat="server" TargetControlID="Panel2" Radius="8"BorderColor="#ffffff">
</ajaxToolkit:RoundedCornersExtender>
<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender3"runat="server" TargetControlID="Panel3" Radius="8"BorderColor="#ffffff">
</ajaxToolkit:RoundedCornersExtender>
</form>
</body>
</html>

Regards

Ajith

Hi Ajith,

My suggestion is you can wrap all contents in an div, and set this div's display property to "none" initially.

Then, add a pageLoad function to show it on client side. Like this:

function pageLoad()
{
$get("div's id").style.display = "block";
}

Hope this helps.


Hi Wen

Thank you Very much. it is working superb, but sometime when page loads, twice loading happens again(some times only).what would be the problem?

plz advice.Thank you very much once again

Regards

Ajith


It's hard to tell because I'm not able to reproduce that.

Can you make sure which element incurs a second postback?


Hi Wen

in my header page , i have menu for each page.for eg consider first menu
having a link to 1st page, in that page i having several textboxes and 1 dropdownlist
and cascadingdropdown and 1 auto complete extender.in that menu i clicked several times
only one time the page load twice.i think it may coz of processing time.

2nd having link to another page, in that page also i am having the same controls mentioned above and aditionally i am having ultrawebgrid(thirdpartycontrol,infragistics).i click
this menu also several time , in this case the pages seems like loading
twice so many times. idont know which control is making the problem.


This is the situation i am having.

Plz advice.

Regards

Ajith

Wednesday, March 21, 2012

Parser Error Message: Could not load file or assembly Microsoft.Web.Atlas or one of its de

hi all,

I have a not so nice error that I can't solve. I use asp .net 2.0 and Atlas. The site works in dev but not on my server...

I hope someone can help me out.

Regards
Stijn

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:Could not load file or assembly 'Microsoft.Web.Atlas' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 1: <%@dotnet.itags.org. Page Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>
Line 2: <%@dotnet.itags.org. Register Assembly="Microsoft.Web.Atlas" Namespace="Microsoft.Web.UI" TagPrefix="cc2" %>
Line 3: <%@dotnet.itags.org. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %>
Line 4:


Source File:/issue/default.aspx Line:2

Nobody? Do I need to give some additional info? This problem really holds up my development so please help meout here.


hello.

well, i guess that you must see if ASP.NET 2.0 is installed in IIS and if the vdir you've created there is configured to use it...


ASP .Net 2.0 is installed and the site also uses the 2.0 version. The error is about ATLAS so I think I have a configuration problem there? I use windows 2003 server.

Hello,

I have the same identically problem.

When I run my application on local web server don't have any problem, but when I transfer my aplication on remote server(Aruba) I have the problem:

Could not load file or assembly 'AtlasControlToolkit' or one of its dependencies. The system cannot find the file specified

Line 1:<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Erbario.aspx.cs" Inherits="_Default" %>Line 2: Line 3:<%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %>Line 4:<%@. Register TagPrefix="test" Namespace="Test" %>Line 5:

Have you resolved the problem?

Help me please


MarcoLF:

I have the same identically problem.

Hi!

We are getting the same exception on our production server. Did you find out what causes it?

Thank you in advance.

Parser Error Message: Could not load file or assembly AjaxControlToolkit or one of its dep

Hi,

I am using ASP.Net 2.0 with AJAX Extensions 1.0. And one of my aspx was using 2 of the ajaxtoolkit namely the ModalPopupExtender and RoundedCornersExtender. But why is it that when I will access the page from the web server the error below will display on the page. It's really frustrating because there's no problem when running locally in my machine thru Visual Web Developer 2005 Express Edition.

I hope you could help me figuring the problem.

Thanks

Error message:

Server Error in '/' Application.

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 1: <%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>Line 2: <%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>Line 3: Line 4: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Source File:/pfadmin/test.aspx Line:2

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

You need to deploy the AjaxControlTookit (DLL) to the server (in your bin directory or in the GAC).

-Damien


Hi hifiger2004,

You can just include the AjaxControlToolkit.dll into the BIN folder of your website/webapplication. There is no need to deploy it to the GAC. (Maybe you don't have the right to do that.)

Also check if some plain ajax functionallity works on the webserver!!! For example: A simple updatePanel holding a datetime.now, and a button to trigger it. Note that the ajax functionality must work in order to use the AjaxControl Toolkit.

Please let me know how it worked out!
Kind regards,
Wim


You have to include the AjaxControlToolkit.dll into the bin folder of your webapplication

Let me know if this helpful to you