Showing posts with label atlas. Show all posts
Showing posts with label atlas. Show all posts

Wednesday, March 28, 2012

Extender controls of type AjaxControlToolkit.DragPanelExtender cannot extend controls of t

Hi, I'm getting this error when trying to port an old Atlas Web App to use the latest bits - any help would be nice as to what controls I CAN extend - so if I can't use a DIV what then?:

Server Error in '/GRintranets' Application.

Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.InvalidOperationException: Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

Source Error:

Line 368: {Line 369:// EnsureProfileScriptService(ScriptManager.GetCurrent(Page), true);Line 370: base.OnPreRender(e);Line 371:Line 372: if (Enabled && TargetControl.Visible)


Source File:E:\My Documents\Visual Studio 2005 Projects\2007\CS\01 - ene2\AjaxControlToolkitSln\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs Line:370

Stack Trace:

[InvalidOperationException: Extender control 'DragPanelExtender1' cannot extend 'divPaginaHTML'. Extender controls of type 'AjaxControlToolkit.DragPanelExtender' cannot extend controls of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.] System.Web.UI.ScriptControlManager.VerifyTargetControlType(TExtenderControl extenderControl, Control targetControl) +262 System.Web.UI.ScriptControlManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +74 System.Web.UI.ScriptManager.RegisterExtenderControl(TExtenderControl extenderControl, Control targetControl) +104 System.Web.UI.ExtenderControl.RegisterWithScriptManager() +177 System.Web.UI.ExtenderControl.OnPreRender(EventArgs e) +17 AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) in E:\My Documents\Visual Studio 2005 Projects\2007\CS\01 - ene2\AjaxControlToolkitSln\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:370 System.Web.UI.Control.PreRenderRecursiveInternal() +77 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360



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

just use an <asp:Panel> control


Thanx Shawn - it works fine now but it doesn't seem to respect the z-index: 999 I'm assigning it (I tried through 'Style' and 'cssClass') - the thing is the window disappears behind other controls.

Could you say something useful about how to go to not let the draggable asp:Panel disappear behind the other page controls? I have explicit a very high value for the z-index but it won't stay on top. TIA

FYI, the page is loaded through AJAX in an iframe inside a table (on a page that uses a MasterPage), like this:

<tr><tdcolspan="10"style="height: 710px; width: 100%; z-index: 999;"valign="top"><!--content-->

<iframerunat="server"frameborder="0"id="ifContent"style="z-index: 999; width: 100%; height: 100%;"/>

<!--content--></td></tr>

Then, the page contains among other controls this combination of controls where I load content from a document in the iframe and make dragging possible through the inner asp:Panel:

<asp:Panelrunat="server"ID="pnlPaginaHTML"CssClass="cssPnlPaginaHTML"Style="z-index: 999">

<asp:PanelID="pnlLeer"runat="server"BackColor="Gray"Style="left: 12px; position: absolute; top: 5px; width: 828px; height: 16px"><spanstyle="font-size: 8pt"> se puede mover la ventana con el mouse rastreando la ventana en esta barra gris</span></asp:Panel><iframerunat="server"id="ifrPaginaHTML"src="#"scrolling="auto"style=" z-index: 999; left: 11px; width: 829px; position: absolute; top: 26px; height: 612px;"frameborder="1"></iframe></asp:Panel><atlas:DragPanelExtenderID="DragPanelExtender1"runat="server"TargetControlID="pnlPaginaHTML"DragHandleID="pnlLeer"></atlas:DragPanelExtender>

Extender Controls not compiling

Hello ,

I recently started working with Ajax/Atlas. I have set up atlas extensions , and am trying to add the control toolkit . I follwoed the instructions , The items show up in the toolbox. When I drag any of the controls onto a webform . Intellisense tell me that the control is not a known element.

I realize this is vague, but if anyone can point me in the right. direction .

Thanks in advance

It seems to be related to how the controls are registered in the site . I have opened other sample projects where the controls are being used and they work fin, in that project .

extend atlas

H i Alll

atlas is a good framework but there are still limit

i want to extend it with some feature .

are there any solution ?

Yes, of course. You can use the control extenders as explainedin this page. The Atlas Control Toolkit helps you write your own controls or extenders.

HTH
thanks for your reply

Monday, March 26, 2012

Exposing Web Services from an ASPX page does not work

Hi All,

I am working with ATLAS technology. i am trying to imitatehttp://atlas.asp.net/quickstart/atlas/doc/services/default.aspx#webpage
"Exposing Web Services from an ASPX page"

i am having an aspx page which is inherited from our own Page class not from System.Web.UI.Page.

public partial class MainSearchPage : some namespace.MyPage

but this example does not work in this context.because in javascript, function OnWebRequestComplete1(result) returns null as result.

please help me in this issue.

thanks
Jaideep

hello.

well, i think that it should work. here's an example:

pypage.cs
namespace Test
{
public class MyPage:Page
{
[WebMethod]
public string HelloWorld(string s)
{
return "Hello '" + s + "'";
}
}
}

now, the aspx page:


Untitled Page

function handle()
{
PageMethods.HelloWorld( "Luis", handleComplete );
}

function handleComplete( res )
{
alert( res );
}

here everything is working properly...

Yes, this should work. To debug your issue, I would try:

Check on the server whether your method gets called at all.

yes, my server side code in code behind of aspx is not getting called.
in javascript side:

function handle()

{

PageMethods.HelloWorld("jaideep", handleComplete );

}

function handleComplete( res )

{

debug.dump(res,"Result",true);

alert( res );

}

in debugger, result is null.also my aspx is having one user control also.i tried to put debug in my code behind.but function HelloWorld is not getting called.

any clue as to what is happening.
thanks

jaideep


after viewing request/response in Fiddler ,i got a message indicating a corrupted viewstate.
same is the problem in following post:
http://forums.asp.net/1205269/ShowPost.aspx "ViewState and Atlas ".
and as per the instruction given , i removed "type =="hidden" condition from file
Atlas.js on line 3495.and now it is working!! but this approach is correct or not?
please let me know about this.
Thanks

JAideep


Copying my reply from the other thread:

I tried a few things, but was not able to repro. Could you give this a try with the March CTP to see if it still happens?

thanks,
David

Exposing Web Services defined in class libraries

I have a class library (or will have) that defines a bunch of web services. I can reference Atlas if necessary. How do I expose all these web services to Atlas via IIS/ASP.Net. In other words, I do *not* want the code for my web services to be in the web project, I want them to be in an external project and optimally just included with a single line for all services, or a line per service if necessary.

Thanks.

All you need to do is to add your assembly as a reference to the web project and then add it to the ScriptManager service reference as following:

 <atlas:ScriptManager ID="ScriptManager1" runat="server" > <Services> <atlas:ServiceReference Type="namepsace.typename" /> </Services></atlas:ScriptManager>

Replace the bold text with the type name of your web service.


Seems that this has changed since way back when... How do I reference a service in a class library now? How do I then hook it up to an extender, e.g. an AutoCompleteExtender?

Thanks.

Execution of Atlas initialization phase

Is there a way to let the init phase of atlas run earlier than when *all* content of a page has been downloaded?

On our site we have content (images, iframes) from other sites. It seems the init phase will not run before all content (thus also content from out of our site, but also our own images) is downloaded. Which gives the user the illusion that our site is slow, but thats not the case, of course ... ;)

Thanks.

hello.

hum...i guess that you'll only have this problem if you're using xml-script. currently, i think that it only is processed on the window.load event...


Any news on this? Will atlas be able to runs its init phase earlier than the window.load event?

I am planning to call the Sys.Runtime.Initialize myself at the end of the HTML instead waiting for the window.onload event to eventually call it.

Does anyone see a downside for this?


I had the same idea, the problem is even when u place the code at the end of the document and call init() yourself u can't ensure that all scripts have been loaded. For example the following script block causes normally an exception saying the WebService.Method isn't aviable.

<script type="text/javascript"> Sys.Runtime.initialize(); WebService.Method( CallBack );</script>
Is there anyway to know when all (webservice)references are loaded and ready? I need to call a function before the window onload but after all atlas ref's are fully loaded.

What we did was doing *all* javascripts include ourselves.
We do not use the scriptreferences of atlas anymore. We even dont let atlas include his own js files...

With Page.ClientScript.RegisterClientScriptInclude we include the atlas.js and his friends. ;)
The services are included as "xxxservice.asmx/js".
This way *all* javascript files are included at the very top of the HTML,
then its save call the service like you were intended to.
The reason why we also register atlas js files is about the order of the include file in the HTML.
When we dont do it ourselfs, the atlas.js may be included to late in the HTML.

HTH

Yesterday I was thinking to mail the atlas team about this "self registerclientscriptinclude" instead of using the scriptreferences
for the very purpose you are describing. Now seeing your post I will definately mail them today! :)


Qty:

The services are included as "xxxservice.asmx/js"

I tryed this myself but i ended up getting requests like "/undefined?mn=MehodName" - i think this has something to do with the appPath var?


Perhaps you can include script that set the path & apppath

RegisterStartupScript "XXXService.path = 'http://website/XXXService.asmx'; XXXService.appPath = 'http://website/'"

HTH


Didn't know the .path var - thx a lot!

Executing inline JavaScript on load

I have a rather complex ASP.NET control -WebDialog - that I'm trying to get working within Atlas' UpdatePanel.

The way the control currently works is by outputting JavaScript in its render method which is executed by the browser on load. The problem is that when an UpdatePanel is refreshed Atlas doesn't seem to execute inline scripts and so nothing happens.

I have tried moving outputting the JavaScript from the control's render method to its PreRender and then passing the script to RegisterClientScriptBlock, which Atlas does execute. While this method works great in simple scenarios, when the dialog has form controls like TextBox and Button it errors. Since I'm manually calling RenderControl on the nested content, and outside of the form's render, VerifyRenderingInServerForm throws an exception.

I don't want everyone who uses the control to have to use a custom page with VerifyRenderingInServerForm overridden.

Is there a solution that will update when an UpdatePanel refreshes yet works with forms controls and isn't obtrusive to the user developer?

hello.

i doubt it...i think that the only option is sending the javascript to the client though the clientscriptmanager class...


If I did that then I'd be dependant upon Atlas and have to include it's dll with my installer and output all it's JavaScript to the page which I don't want to do.
From what I'm reading, I believe that your JS code is registering with the window's onload event. The first time your page loads the window.onload event occurs, but subsequent partial postbacks don't cause the window.onload event to occur again.

Your thoughts of registering the script with RegisterClientScriptBlock (or RegisterClientStartupScript) seem to be on the right path. I'm not real sure from your posts why your having to manually call RenderControl (shouldn't the controls be added to the parent control's control collection?), but executing inline JS code on load is possible on an UpdatePanel refresh by registering with the ClientScriptManager.

- Joel

hello.

James Newton-King:

If I did that then I'd be dependant upon Atlas and have to include it's dll with my installer and output all it's JavaScript to the page which I don't want to do.

hum...i'm following you...you say that you don't want to be dependant upon atlas ( i think you're talking about the server side dll?)...but you also say that you have the control placed inside an updatepanel. the only way you'll use a panel is if you add the atlas dll to your app!

one more thing: if you're using asp.net (i assume you are) then you can use the clientscriptmanager without any problems since it was introduced in asp.net 2.0 to handle client script registration.


Luis Abreu:

hello.

James Newton-King:

If I did that then I'd be dependant upon Atlas and have to include it's dll with my installer and output all it's JavaScript to the page which I don't want to do.

hum...i'm following you...you say that you don't want to be dependant upon atlas ( i think you're talking about the server side dll?)...but you also say that you have the control placed inside an updatepanel. the only way you'll use a panel is if you add the atlas dll to your app!

one more thing: if you're using asp.net (i assume you are) then you can use the clientscriptmanager without any problems since it was introduced in asp.net 2.0 to handle client script registration.


Obviously if the dialog was inside an UpdatePanel then the app would be using Atlas but this control is also for regular ASP.NET 2.0 users. They're the reason I don't want to become dependant upon Atlas.

Sorry, I confused the ScriptManager in Atlas with the ClientScriptManager in ASP.NET 2.0. I am already using the ClientScriptManager (RegisterClientScriptBlock is a method on it) to register the script so I thought you must have meant the Atlas one. The problem I'm having using RegisterClientScriptBlock is that when I register the JavaScript and render the html in PreRender, ASP.NET throws an exception. It doesn't allow form form controls to be rendered outside of the form.

Anyway, I've come up with a solution that appears to work:
I'm rendering the HTML like you usually would on a page but inside a hidden div and outputting the other JavaScript using RegisterStartUpScript so that it works with Atlas's UpdatePanel. When the dialog is displayed I copy the HTML out from the hidden div into the dialog.

Execute client script in a async postback

Hi,

I´ve just replaced the july atlas ctp with ajax 1.0. I have a button as part of a UpdatePanel. In the serverside clickevent of the butten I want to call a client script but it doesn´t work. Even a simple alert('test') doesn´t work. I´ve used Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "test", "alert('test');", true); as well as the similar command ScriptManager.RegisterClientScriptBlock. Can anybody help me?


Thx

Hi,

You need to call the new static registration method on ScriptManager to register the script. For the first parameter pass in the button that's inside the UpdatePanel to get its script to be sent down along with the UpdatePanel's new contents.

Thanks,

Eilon


hello.

btw, i have 2 questions about the new methods:

1. what happens if you're aa component developer? i mean, say that you need to support full and partial postbacks so that you allways sent something back to the client side. if you use the the new registerXXX from scriptmanager, you're creating a dependency between your control and ajax extensions. what happens if you don't wont ajax extensions on your app?

2. even though i see the possibilities in associating a script with a control placed inside an updaptepanel (while performing the script registration), what happens when you just need to insert a script back on the page during a partial postback? an example; you have a simple page with an updatepanel and you set the childrenastrigger to false. the objective of the panel is to let you get info from the controls, do some server side processing and then return a script to client (yes, a little off, but it's something that might be used by the old instance page methods fans since there's no instance page methods in the current release). since the chidrenastriggers is set to false, you can't send back a script from the server side (even though you assaociate it with a control inside the updatepanel) because the panel isn't being refreshed and due to that, it won't be included in the page.


More info about script registration in my recent post:http://forums.asp.net/thread/1440058.aspx

Thanks,

Eilon


Finally it works, thanks a lot!

Eilon:

More info about script registration in my recent post:http://forums.asp.net/thread/1440058.aspx

Thanks,

Eilon


hello.


still some questions remain:

1. my controls must always link to the ajax extensions dll even if the pages that use them aren't using ajax

2. i've presented a scenario where i just use an updatepanel to get all the controls on the server side and i need to send back a javascript message to the client. how can i accomplish this (i've set the childrenastrigger to false since i don't want to refresh the panel). if there was an overload for inserting javascript on the page without associating the instruction to a control, it would solve my problem (note that in those cases, i know that there's no chance of cleaning the script but i'd prefer to have that option since most of the time i'll be sending method calls from the server side).


Hi Luis,

1. See another of my recent posts:http://forums.asp.net/thread/1445844.aspx

2. The way I would like to see this implemented is that instead of the page registering the script, the page should add a control to the UpdatePanel and that control should register its own script. Nevertheless, it's a suggestion I've been considering myself. For example maybe if you pass in the Page or something we'll always include the script. I'm just afraid that it's a feature that people will abuse to no end and perhaps cause even more problems than it solves. Definitely under consideration, though.

Thanks,

Eilon


you may also look here:

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

Saturday, March 24, 2012

Exceptions and javascript errors

If you have an updatepanel, and an exception is thrown during postback, a javascript error is generated. Is there any way that atlas could display the exception that was generated?

Not with the current release. We'll be adding some support for error handling.

What I am curious is why you'd want to show the exception on the server to the user. Exceptions really aren't meant for end users to see, given they have not much context to interpret them.


Well, it's nice for debugging purposes, I don't mean to necessarily show the error to an end user. Right now, as far as I can tell, the easiest way to see the exception that is generated is to temporarily turn off EnablePartialRendering.

Yes, the plan would be to make sure you can get the exception info, but the plan would probably not provide an out-of-the-box way to display it (you could do that if it makes sense for your app).

What I use right now for seeing exception info is my web development helper's http tracing (the response shows the exception info). Check outhttp://www.nikhilk.net/Projects.WebDevHelper.aspx.

Exception in WebResource.axd when PostBack occurs in Firefox

I attempted to add an ATLAS UpdatePanel to a page that can cause an additional page to popup for some user input. When the popup is closed the data entered is, via JavaScript, posted into controls within the UpdatePanel in the calling page via "window.opener..." calls and then a postback is performed in the calling page via a "window.opener.__doPostBack()" call. This works fine in IE but, with Firefox 1.5.0.6 it fails with the following appearing in the Firefox JavaScript console:

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://localhost/TaxBrowser/WebResource.axd?d=UtGnGti3th-E3k4H6R_105-ZnoTFL0xfqNYWKYczTD1WL_MlZnWikLeZY4VJgy1PFU2wuwGL8eNKwcH3DdmeLa2lMRfeto2rgkZK9pto_QA1&t=632870129240000000 :: anonymous :: line 4140" data: no]
Source File: http://localhost/TaxBrowser/WebResource.axd?d=UtGnGti3th-E3k4H6R_105-ZnoTFL0xfqNYWKYczTD1WL_MlZnWikLeZY4VJgy1PFU2wuwGL8eNKwcH3DdmeLa2lMRfeto2rgkZK9pto_QA1&t=632870129240000000
Line: 4140Same problem...

I'll cry with you...Crying

Hi,

It's an old post, but I have the same problem.

Did you find an explanation ? What did you do to avoid that error ?

Thank's.

Gilles


It's not so old... The explanation... I send a e-mail to one of the Atlas developers so we could know something... if they know this, if it will be fixed in next release, blablabla... Nobody answered...

To avoid the error... i remove the atlas update panel on that page...
I had a similar problem on a page where I added some updatePanels dynamically. I managed to fix the problem by placing the __doPostBack() call inside of a window.setTimeout, as seenhere

Hi

I get the same error with v1.0. And I tried the setTimeout workaround with no success.


I resolved my problem with the setTimeout solution...

Thx man, my problem lied in that the script script did a window.close() directly after __doPostBack...

function doPostBack(e) { window.opener.__doPostBack(\'" + _owner + "\'); window.close(); }
setTimeout('doPostBack()', 0);

...the solution was...

function doPostBack(e) { window.opener.__doPostBack(\'" + _owner + "\'); setTimeout('window.close()', 500); }
setTimeout('doPostBack()', 0);

Exception has been thrown by the target of an invocation.

I have an Atlas enabled asp page working fine in Visual Web Developer 2005.

It has a Web Service with two methods one for an autocomplete and another to generate a datatable to populate a datagrid.

The second method makes calls two methods from a DataSet object.(one gets a row and the other its details.)

When I deploy to produccion the autocomplete works fine but populating the datagrid fails with:

Exception has been thrown by the target of an invocation

thrown by InternetExplorer.

I tested the Web Service calling its operations directly and it works fine.

Please help.

ps. the production machine has low space in C:\ drive.

In both cases I go against the same SQL Server 2000 database.

Since I posted the question above I was able to "deploy" to a Virtual Directory (called "LocalAtlas" situated on D:\VB Projects\VB Web Developer\Atlas Web Virtual Dir\ ) of my Local IIS and after I added the impersonation tag

<

identityimpersonate="true"userName="vvvvvvvv"password="pppppppp"/>

the page worked as expected. However, it is looking for the .asmx file in the same directory where Visual Studio looks.

But changing the KEY tag from

<

addkey="OBWebServiceRef.OBWebService"value="http://localhost:1459/AtlasWebSite1/OBWebService.asmx"/>

as created by Visual Web Dev to

<

addkey="OBWebServiceRef.OBWebService"value="http://localhost/LocalAtlas/OBWebService.asmx"/>

or anything else I can think of (in Web.config) does not work.

(I removed the fileAtlasWebSite1/OBWebService.asmxto avoid using it)

Example of webparts

Some link, some examples of ATLAS webparts implementation ?

Giuseppe

http://blogs.neudesic.com/blogs/david_barkol/archive/2006/03/22/82.aspx

-Mike

My problem is that when the webzones are inside an updatepanel, When I go in deisgn mode, I can not move the webpart from a webzone to an other.

If I move the webzones out of the UpdatePanel all work fine


Is this using the April CTP of Atlas? We recently fixed several issues with WebPartZones inside UpdatePanels.

-Mike


Yes this append in April CTP, but the problem is very simple, you can not drag & drop (move) the webpart from a webzone to an other webzone when these are inside an updatepanel !!!


Professor,

I've got this solution. Your control that turns on design mode needs to be on the page (not in update panel) so every webpartzone will receive the message to except drops. Easy enough its just one page refresh. Yes I sometimes also get the drag inhibitor if I select a webpart for edit first before moving it. I thought it was my implementation because my editor zone has atlas drag positioning. But if I turn design mode to browse then back to design everything works fine. Its preview and a known bug. I had four problems with controls not working as webparts in March CTP and simply moved these controls outside of the updatepanel.

ASP.Net Menu Control

ASP.Net Upload Control

The control you use to switch webpart display modes

ASP.Net Catalog Zone Control

Check out my bloghttp://spaces.msn.com/sipjbydws400/blog/ I made a post on adding atlas to webparts I found it very easy, but remember Atlas is CTP Webparts are ASP.Net release quality.

Good Luck

DWS


When using WebParts with UpdatePanel, you should place all of the WebParts controls inside the UpdatePanel. This includes the WebPartManager and all WebPartZones, CatalogZones, EditorZones, and ConnectionsZones.

-Mike


Should you use seperate control panels for each web part to eliminate all web part firing at once?

If you create your web part as a usercontrol with the update panel on the user control do you have to place the web part in the control panel?


There are some issues in the April CTP with placing UpdatePanels inside WebParts.

-Mike


Yes Mike, there are some issues, and one of it is the fact that when you try to go in design mode from a Control that is placed inside of updatepanel, the webparts will be not movable.

If you move the control that set in design mode out the updatepanel, all will work fine.

Giuseppe


Are you talking about putting WebPartZones inside UpdatePanel, or UpdatePanel inside a WebPart? The first scenario should be working, and the second scenario is currently not supported.

I have not seen any issues with placing a control to set DesignMode inside the UpdatePanel. Can you post the smallest bit of code to reproduce this?

-Mike


I have dynamically created webparts (added in codebehind) working, and I have one webpart that has it's own update panel (end result is nested control panels) and it's actually working. However, putting a TimerControl inside the webpart does not work. It results in a full page postback on Tick.

I would like to encapsulate the behavior of the Webpart, so that the main page does not have to know specifics about each webpart, but I can't get the nested TimerControl working.

I don't expect anyone else is attempting to do what I'm trying to do, but if anyone does know about TimerControls I'd like to hear your ideas.

Here's the process:

-Main page has update panels surrounding each webzone
-On page init, a webservice is called telling the page what the webpart layout should be.
-A routine in code-behind assembles those webparts (which are all custom user controls, ascx files) and adds them in the appropriate zones

Everything is all good so far.

-Maybe one of the ascx files needs to refresh itself every few seconds, so it has a TimerControl
-I search each webpart looking for anything that needs to be registered with the Atlas Script Manager, and do so with the TimerControl
-that doesn't work.

As I mentioned, I have atlas-enabled one of those webparts resulting in nested updatepanels, and it works as it should... until I add a TimerControl

Thanks for any ideas!

Example of an Atlas Site

Well, I have been using some of the Atlas functionality now for quite a while and have used it to rewrite a site I run for charity.

I must admit, I have been pretty amazed with what you can do with it and the speed which you can develop something new. Thought I would post up my site so people could get ideas and give me suggestions on how it can be improved. Still putting the finishing touches on it.

http://www.scigoalplanning.com/ExerciseSearch.aspx

I am thinking about using the new animation functionality to provide a training demo to teach people how to use the website, as it can be a bit daunting for first time users.

This site is a resource of exercises for people who have suffered a spinal cord injury or like neurological condition. You can perform a search, get a gallery of exercises, choose exercises by clicking on the image and then make up an exercise booklet. You can create your own logons and then customise these booklets for clients and export them to word/PDF etc. It is meant to be used by physiotherapists.

Technical Background :

ASP NET 2, C# - Uses Atlas and Webservices extensively, Atlas Client Library - popups etc, SQL Server database

Super cool Atlas website

example "Using the ASP.Net "Atlas" XmlDataSource control" doesnt work!

on :http://atlas.asp.net/docs/atlas/doc/data/default.aspx#XmlDataSource, the "Using the ASP.Net "Atlas" XmlDataSource control" doesn't work.
On click of the link, I redirect it to the http://www.asp.net/forums page.

Can someone help me solving the problem?

Thanks in advace,
Stefano

Stefano,

This appears to work for me. Can you please try it again in a new browser window? Alternatively, you can go tohttp://atlas.asp.net/docs/atlas/doc/data/default.aspxand then scroll down.

Thanks,

Shanku


Sorry, I did not mean to say that the link does not work, but that the example does not work.
If I click "Run it" button in the examples it opens the page: http://atlas.asp.net/docs/atlas/samples/data/XmlDataSource.aspx.
If I click the "Sample Post" link, I redirect to the http://www.asp.net/forums page.

example "Returning a DataTable" doesnt work!

on :http://atlas.asp.net/quickstart/default.aspx, the "Returning a DataTable" doesn't work( on atlas.asp.net. and on my local server too) I don't understand!

Any data are binding!

I'm using IE6! I see somewhere that it's not <binding> but <web:binding> it doesn't work better!

Help me please

ALCINA.

thanks to Garbin. he has provide one nice example in
http://forums.asp.net/1198570/ShowPost.aspx

check it out

EventValidation error msg!

one of the Atlas control popup me something that i need to implement an event agrument or something!! ?? tha happen on a click of a ListBox control.

i am verry confuse here !

"Invalide postback or callback argument. Event validation is enabled using <page enableEventValidation=true> in configuration or in the page. For security purposes, this features verifies taht arguments to postback or callback events origiante from the server control that originally rendered them. If the data is valid and expected, use the ClickScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation."

What im suppose to do with that now?

I fix it !!

this is what i did.. i had a UpadatePanel inside a UpdatePanel.. and thats what was causing a script Popup msg !!

events for asp controls nested in an atlas control

How do you go about accessing and declaring events for thosecontrols that are nested within the accordion control (for example) ?

ie.I want to have the following Sub for a txtBox that is nested within anaccordionpane? I understand to get to the control's properties you canuse the .FindControls method on the accordion pane, but how do Ideclare a control's event like below?

Protected SubtxtBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)Handles txtBox.TextChanged
...
End Sub

<atlasToolkit:AccordionPane ID="AccordionPane1" runat="server">
<Header><a href="http://links.10026.com/?link=" onclick="return false;"class="accordionLink">5. References</a></Header>
<Content>
<asp:TextBox ID="txtBox" runat="server" CssClass="txtBox" />
</Content>
</atlasToolkit:AccordionPane>

Thanks

You should be able to wire them up like you normally would through either HTML or in code.

via HTML: Just add TextChanged="txtBox_TextChanged" to your TextBox tag.

programmatically: Use FindControls to get the control and then (C#) objTextBoxRef.TextChanged += EventHandler(txtBox_TextChanged);


How would I do it in VB.Net ?

In HTML I have, for example:

<asp:TextBox ID="txtBox" OnTextChanged="txtBox_TextChanged" runat="server" CssClass="txtBox" />

on the .vb code page I then have:

Public WithEvetns txtBox as TextBox

Sub txtBox_TextChanged(ByValsender As Object, ByVal e As System.EventArgs) HandlestxtBox.TextChanged

xtBox.Text = Format(txtBoxy.Text, "currency")

End Sub

But I get the following error:

Error 1 Method 'Sub txtBoxTextChanged()' does not have thesame signature as delegate 'Delegate Sub EventHandler(sender As Object,e As System.EventArgs)'.


excuse my typos...in my last post.Actually my errors window was just not refreshing.

But still, when I run it, the textchanged event does not fire at all...


...nevermind. i did not have the attribute "AutoPostBack = True" in my tag..I hate it when I'm such a beginner...

Wednesday, March 21, 2012

Events during Drag and Drop operations

I am looking for more information about the events supported by the drag and drop library in the latest release of ATLAS. For example, I would like to define a drop target and respond to an element being dropped on it. Is there a QuickStart that covers these events?

Try one of the dedicated Atlas forums, perhaps?

Events & Atlas enabled Custom UserControls

I've got a UserControl I use to search for a customer. This UC contains a ScriptManager and an UpdatePanel.

Just for simulation I've created a page containing 2 of my UC's, this generates an error saying :

Only one instance of a ScriptManager can be added to the page.

If I use only 1 UC on the page I'd like to inform the Page that a Customer was selected so I try and raise an (public) event but that results the little error icon on the bottom left corner of IE saying 'error on page' Details: Line:40, char:1 Error:Object expected Code:0URL:http://.../default.aspx

I can imagine that since this selection/postback is done from within an UpdatePanel, the rest of the page cannot be 'reached' by the event and that would cause an error. If I remove the UpdatePanel things work just fine...

What would be a good way for an Atlas enabled UserControl to 'talk' to the page (or UserControl) on wich it is currently begin used.

Regards,

Jurjen.

Hi Jurjen,

To use two UserControls on the same page put the Atlas Script Manager Proxy tag in the Usercontrol insted of ScriptManager tag and add the ScriptManager tag in the page which uses this UserControl. I think this would solve your first problem.

Regarding the second could you please explain in detail what you are doing and what is to be done.

Thanks & Regards,

Eventlog warning

I keep getting this warning in the eventlog from my website that uses atlas. I am not doing anything with Cryptography so I am thinking it is from atlas. Any idea on how to fix this?

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 9/1/2006
Time: 4:50:28 PM
User: N/A
Computer: xxxxxxxxxxxxx

Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 9/1/2006 4:50:28 PM
Event time (UTC): 9/1/2006 9:50:28 PM
Event ID: 2d0ae359c3f644e1abe59a1f0154872d
Event sequence: 4021
Event occurrence: 2
Event detail code: 0

Application information:
Application domain: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Trust level: Full
Application Virtual Path: /
Application Path: xxxxxxxxxxxxxxxx
Machine name: xxxxxxxxxxxx

Process information:
Process ID: 7920
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: CryptographicException
Exception message: Padding is invalid and cannot be removed.

Request information:
Request URL:http://www.windowsformsdatagridhelp.info/WebResource.axd?d=TiBePznmD981jNt4qHilAUYivOfdjr3CnSFDzk5Y9MU1&z=1
Request path: /WebResource.axd
User host address: 72.30.102.135
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo)
at System.Web.UI.Page.DecryptString(String s)
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at Microsoft.Web.Services.WebResourceCompressionModule.OnPreRequestHandlerExecute(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Custom event details:

For more information, see Help and Support Center athttp://go.microsoft.com/fwlink/events.asp.

Bump. I am getting spammed with error messages similar to this. Anybody know the exact cause and how to fix it?

This exception is generated by the new feature in 2.0 calledhealthMonitoring

Basically your app is throwing a exception when hitting this page:

http://www.windowsformsdatagridhelp.info/WebResource.axd?d=TiBePznmD981jNt4qHilAUYivOfdjr3CnSFDzk5Y9MU1&z=1

and the framework is writing the log. You can disable Health monitor on your web.config

<healthMonitoringheartbeatInterval="0"enabled="false">

</healthMonitoring>


I disabled the health monitor in the web.config (isn't it off by default anyway?) and the error is still coming up. I have no other controls making this call to WebResource.axd other than Atlas, so what's the deal with the Cyptography errors?

anyone get a fix on this? I'm getting the same error...

to add insult to injury, I have 1 server running a few sites... I get this error regarding one of my sites, and that seems to take down another site. both sites are running under their own application pool. also, every time I get a 1309 error message, it seems to be followed by at least 2 ".NET Runtime 2.0 Error Reporting" errors (error id 1000, category "None"). anyone have any idea's?

Cheers


Quick question - is your site dynamically generated - meaning that utilize a IHTTP handler to generate the pages / page urls ?

If so then the error you are getting can be fixed...see this blog entry -

if you are serving it all from the file system then it will have no real relevance unless you are doing some kind of url rewriting...

May or may not fix your error....


I am not using any IHTTP handlers or doing anything with Cryptography so I was suprised I was getting the error. Turning off the health monitoring has stopped the event log messages. I am in the process of rewritting the website to use the asp.net ajax beta 1. Hopefully whatever was causing the error was fixed in the latest beta

the problem is usually caused by the request parameter(hashed string value) be invalid and the webresource.axd fail to verify it.

Have you ever found it occurs exactly when you interactively visit any page in your ASP.NET 2.0 application or any other user who get such error when they directly visit the pages in your application?

A web crawler could be causing this by making a request to a url with a hash that has expired ex:

http://www.windowsformsdatagridhelp.info/WebResource.axd?d=TiBePznmD981jNt4qHilAUYivOfdjr3CnSFDzk5Y9MU1&z=1

This will work for sometime after the page is generated but then the hash will expired.

if you are running a web farm you may run into this problem, because you need to configure the mchine.config using the same key

http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=17c64976-ee21-4055-9de4-992d9c59e589

Other causes could be third party products on the web server such as SecureIIS (by eeye.com). If you go into SecureIIS and disabled the security for the website in question, your JavaScript / WebResource.axd - 404 error may go away.


i'm also geetting the same error... it just hangs or freezes and produce the warning message at the event viewer... but i tried to put the site on another computer and it works perfectly...

has anyone resolved the problem yet?