Showing posts with label adding. Show all posts
Showing posts with label adding. Show all posts

Monday, March 26, 2012

Installing/Adding ATLAS Conrol Extenders

Hi,

I have downloaded the extenders from the website.

Although when I attempt to add Microsoft.AtlasControlExtender.dll to the toolbar - I receive the following error:

--------
Microsoft Visual Studio
--------
There are no components in 'C:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727\Atlas\Microsoft.AtlasControlExtender.dll' that can be placed on the toolbox.
--------
OK
--------

why is that so? what am i doing wrong? I just want to use the textbox watermark for a start :).

any help is much appreciated.

Thank you.Install "AtlasControlToolkit.dll", not "Microsoft.AtlasControlExtender.dll"

See http://atlas.asp.net/atlastoolkit/Walkthrough/Setup.aspx for full setup
Colin,

I have already installed that one.

But when I've added all the controls - none of the TextBox watermark or sliding Containers - they're not there.

So I figured I had to install the Extenders...

If in fact they're part of the AtlasControlToolkit.dll - why dont all the extenders come up when I add them to the toolbar?
Interesting... they should be in AtlasControlToolkit.dll

Check to make sure you have the latest version of the control toolkit. If you do, you might try deleting the tab (or resetting the toolbox) and recreating the toolkit tab.

Microsoft.AtlasControlExtender.dll only contains the base class that all the extenders inherit from, so you won't find any useful toolbox items there.
Colin - i had a look - and in fact after re-adding it - worked perfectly.

Thank you very much.

R

Saturday, March 24, 2012

Is a "partial postback" really partial?

Hi,

I've inherited a large project and am now in charge of adding AJAX support to it, in order to make it seem more responsive to the users, and to avoid having to perform a complete postback every time the users want to navigate to a different control.

However, my first experiences with using AJAX.NET seem to be a bit disheartening. I added a simple UpdatePanel to the form, as well as a button and a textbox inside of it. The button has a server-side call to update the textbox with DateTime.Now.ToLongTimeString(). Now, whenever I call it, it takes at least 4 seconds to perform a round trip to the server and back with the time. This is unacceptable for our purposes, so I looked into the cause. Our pages are, to put it politely, freaking huge. For the 4-second one, the page is over 100k. So I did some testing, and it appears that on an ajax-postback, the entire page is being posted back to the webserver, constructed, and updated, and finally the relevant pieces (mainly the contents of the update panel) are sent back to be updated.

On the web I've seen many references to so-called "partial postbacks", which I took to mean that the AJAX call is only going to send the contents of the update panel back to the webserver, and not the entire page. Am I incorrect thinking this? In other words: is the entire web page always going to be sent back to the server, even with AJAX calls, or am I missing something important here?

Thanks for your time.

Hi

What you are getting is the default behaviour. What happened in ASP.NET AJAX is that page is posted back to the server and all the page events are rendered as such as in normal postback.

What happens actually, when you put the controls inside Update Panel, only the portion of the data that is inside Update Panel renders back to the server but the complete life cycle of the page behaves normally as normal postback.

So if you want the real power of AJAX, you have to sync with View State and all other stuff.

Hope that helps you..

Bye


Ron,

Your issue there could be ViewState size. Even if the page sends and receives only the data relevant to the UpdatePanel to refresh, ViewState is still transmitted and the complete page life cycle occurs.

Just turn trace on and check you ViewState size. If it's huge, try to find the controls that may have it disabled. If you manage to reduce it's size, your AJAX page will be "faster".

Also, something that really helped me to reduce "page size" and, therefore, AJAX "speed", was to enable IIS dynamic compression.


Cheers,

Juan


Yeah, compression helps, also make sure that your running in compilation mode='release' (in debug the scripts are 3x or more larger). Also, if there's no way to tighten up your viewstate, thne it might be worth it to look at other refresh techniques (more js heavy, less plug-n-play) like PageMethods or Webservices. Those will reduce the traffic to only that which is necessary.


I have found that using update panels and MS ajax will be quite a change in how you philisophically go and layout a page. This is something you will find out over the time you are working on your app. For instance, I had the same type of problem you did with viewstate and page size. I found that I had a gigantic drop down list that was filling up my viewstate and gridviews with lots and lots of records in them. My solution was to get rid of the dropdownlist by using a quick search repeater with a select button on each record. This, in a world with full postbacks would be cumbersome, but with updatepanels becomes quite easy. Second, I have gone the route of creating interfaces similar to regular applications like outlook with a record browse on the left and context on the right. The outer page with browsing is a page and the record is a page that gets popped in an iframe. This allows for a quickie javascript double click to open the record in its own window and a single click to open the record in the context window.

Another big help is managing your refreshes. You will find that using the 'updatemode="conditional"' setting in your update panels will also help to speed up the page. When an updatepanel is left without the conditional mark it postsback on each partial postback. Sometimes the implementation of this can be a bit tricky because you have to call the updatepanel.update() method in codebehind, but the benefit is definately worth the hassle.

Finally, shrinking down what you have in your updatepanels will definately help you keep your page moving quickly. If your entire page with huge drop down lists, etc.. works off one gridview this will be troublesome. When you can put your updatepanel around one textbox, then an updatepanel around the update button, you will be well on your way to super fast processing.

Remember that a partial postback posts back anything within the update panel and, therefore, the more you have in the updatepanel, the more that needs to be sent back to the browser.


Great thoughts, and advice. I'll echo the fact that it's a real balancing act, though. Too much granularity in your updates and you lose scalability. Too little and you kill your bandwidth and users suffer. Good page design can go along way to help you keep the balance.

Is a ScriptManager required in every page?

Hi there,

Is there a way to avoid adding a ScriptManager control to every page, just to set the EnablePartialRendering to true? Maybe the partial rendering setting can be configured in Web.Config or somewhere else.

Thanks,

-BentonAgreed. It would be nice to only have to add the ScriptManager in 1 place
instead of every page. I can also understand the other side which says that
by having the ScriptManager in each page, you only add it where it is
needed. However, having it by default if I create an "Atlas" web project
would be a great thing.

Wally

wrote in message news:1201622@.66.129.67.203...
> Hi there,
>
> Is there a way to avoid adding a ScriptManager control to every page, just
> to set the EnablePartialRendering to true? Maybe the partial rendering
> setting can be configured in Web.Config or somewhere else.
>
> Thanks,
>
> -Benton
>

Its not that simple. ScriptManager does a whole lot more than provide a way to enable partial rendering. It orchestrates the entire process by hooking into the page lifecycle in very interesting ways. It also provides a way to define script and script references (typically these are per page, and the config mechanism for per-page settings via location tags is in my opinion really ugly and non-designable).

Scriptmanager also provides APIs used at runtime to make it possible to generate the desired rendering. See my post:http://www.nikhilk.net/AtlasScriptManager.aspx.

The lifecycle bits and APIs could theoretically be implementated via a base AtlasPage class... but this is much more heavy handed approach than adding a control - surely you don't want to have to rebase all your existing page classes from a new base (esp. hard without multiple inheritance)

Hope that explains the current design. I agree if all it did was provide that property, a config option would be just as fine (though in an ideal world you'd want all that on the <pages> section, and in the Page directive, which cannot be done until System.Web is rev'd)


What about putting it in a Master Page..

A.


I've never been able to use Atlas in Masterpages, so I don't know if that will work at this time.


I have the same problem... Do you think it′s an individual configuration problem or it′s an ATLAS problem itself?
Hi,

could you give some examples of the issues you are having with MasterPages?