Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Wednesday, March 28, 2012

UpdateProgress panel

I'm using the updateprogress panel on my pages and when its "running" it moves my grid down on the page, is it possible to show it in a pop up window or show it overlaying my grid?

In essence, when I'm showing my "Processing" I want it either in a pop window or overlaying my grid view some how. can this be done?

Hi IGotYourDotNet,

You can take a look at theModalPopup orAlwaysVisibileControl because I think these have both been used by people on this forum for showing update progress.

Thanks,
Ted

ok thanks, I'll take a look at them.

also I currently have it on the page running and when the page errors out it shows a javascript alert box and doesn't take the user tomy error page. Is there a way to not show the javascript alert box and take them to my error page with using the updateProgress?


IGotYourDotNet:

I'm using the updateprogress panel on my pages and when its "running" it moves my grid down on the page, is it possible to show it in a pop up window or show it overlaying my grid?

In essence, when I'm showing my "Processing" I want it either in a pop window or overlaying my grid view some how. can this be done?

If I'm understanding correctly, I think you can just put the contents of your updateprogress info inside of a div and set the z-index. Like this:
1<atlas:UpdateProgress ID="UpdateProgress1" runat="server">2 <ProgressTemplate>3 <div style="z-index:100;position:absolute;left:10px;top:0px;">4 Loading...5 </div>6 </ProgressTemplate>7</atlas:UpdateProgress>

This will also position the progress at the very top left of the browser


I want it centered on the page, not in the corners of the browsers

IGotYourDotNet:

I want it centered on the page, not in the corners of the browsers

Just change the div style to this:

<div style="z-index:100;position:absolute;left:50%;top:50%;">


yeah i got it to work but I don't like how it looks. I'm going to look at the modal/popup to see if I can get that to work.

Also in using this, how can I still take my users to the error page (if it happens) and not show the javascript alert window like it currently does?


Hi,

I'm not very familiar withUpdateProgress, but if you ask this in the"Atlas" UI forum you should be able to find out.

Thanks,
Ted

Updateprogress on page_load ?

I have a long running process that might take several seconds to populate a control. Id like to show a progress indicator while this is being done. Anyone got an example of showing an updateprogress during page_load ? Maybe I can just use javascript to invoke a button click event on a non-visible button and have it start off the process ?
 here's a quick example:
var $user_updateProgress=Sys.Application.findComponent('ctl00_WorkingArea_Container_User_list1_UserLookupProgress');
 I had an UpdateProgress control named UserLookupProgress which I wanted to display. When the page loads, the control gets loaded into a javascript Sys.UI.Control.
So I needed to access it and it was driving me nuts! so I took a look at the source and figured out how they were doing it. Ultimately you need to use the findComponent method
of the Sys.Application class. The thing I could not figure out is why I had to reference the fully qualified ClientID in order to gain reference to my control.
From there I was able to show/hide the control.
 Hope this helps.
 P.S. if anyone has a better way , PLEASE chime in ;)


I want to show a updateprogress while my page loads. There is a tree that is populated with a large amount of data.

i have encounter same problem b4, that need to load a large data on the page load

but the interface will hang untill all the data was process.

i did a silly job to solve this problem

add a timer that run only once, set it to false by default, then on pageload and Ispostback=false, enable the timer run only once.

in the timer tick event bind the data.

thus, the databind is start after page load, and updateprogress working in this way too.

UpdateProgress Problem

I am running Atlas on a Win 2K3 Server and I installed the latest version of Atlas today. I created a simple hello world page, which runs as expected. However, when I add an UpdateProgress control and try to view the page, the following two alert boxes appear (in order):

"Assertion Failed: Could not resolve reference to object named "_pageRequestManager" for "dataContext" property on object of type "Sys.Binding"

"Assertion Failed: No data context available for binding with ID"" and dataPath "inPostBack" on object of type "Sys.Binding"

The ASPX page that works correctly is:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" %>
<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
lbTest.Text="Hello World!";
}
</script>
<!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>Atlas Test</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager id="ScriptManager1" runat="server"></atlas:ScriptManager>

<atlas:UpdatePanel id="update1" runat="Server" Mode="Conditional">
<ContentTemplate>
<asp:Label id="lbTest" runat="server">This is a test</asp:Label>
<asp:Button id="Button1" runat="server" Text="Test Atlas" OnClick="Button1_Click" />
</ContentTemplate>
</atlas:UpdatePanel>
</form>
</body>
</html>

The ASPX page that fails is:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" %>

<script runat="server">

protected void Button1_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(2000);
lbTest.Text="Hello World!";
}

</script>

<!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>Atlas Test</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager id="ScriptManager1" runat="server"></atlas:ScriptManager>

<atlas:UpdatePanel id="update1" runat="Server" Mode="Conditional">
<ContentTemplate>
<asp:Label id="lbTest" runat="server"></asp:Label>
<asp:Button id="Button1" runat="server" Text="Test Atlas" OnClick="Button1_Click" />
</ContentTemplate>
</atlas:UpdatePanel>

<atlas:UpdateProgress ID="ProgressIndicator" runat="server">
<ProgressTemplate>
<div id="progressArea">
Loading the data, please wait... <asp:Image ID="LoadingImage" runat="server" ImageUrl="~/img/spinner.gif" />
</div>
</ProgressTemplate>
</atlas:UpdateProgress>
</form>
</body>
</html>

My web.config file looks like this:

<?xml version="1.0"?>

<configuration>

<configSections>
<sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">
<section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>
</sectionGroup>
</configSections>

<microsoft.web>
<converters>
<add type="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>
<add type="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>
<add type="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>
</converters>
</microsoft.web>
<system.web>
<compilation debug="true"></compilation>

<pages>
<controls>
<add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
<add namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>
</controls>
</pages>

<authentication mode="Forms" ></authentication>

<xhtmlConformance mode="Strict"/>

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>
</httpModules>

</system.web>
</configuration>

I pulled the UpdateProgress directly from a sample online, and I can't figure out why it doesn't work.

Can anyone spot any obvious errors? Are there trust issues related to the DLL that holds the UpdateProgress class?

Any help, leads or links would be helpful - thanks.

Update - the first example I posted above DOES NOT WORK. The postback was so fast I mistakenly thought it was working.

No Atlas scripts are working above - anyone have any ideas?


I discovered the problem. I had forgotten to add an "EnablePartialRendering"attribute to true on my ScriptManager.

The first page above had a pagewith just an UpdatePanel. The pageworked, but it posted back instead of updating through atlas. When I added an UpdateProgress, I got thefollowing two error messages:

"Assertion Failed:Could not resolve reference to object named "_pageRequestManager" for"dataContext" property on object of type "Sys.Binding"

"Assertion Failed:No data context available for binding with ID"" and dataPath"inPostBack" on object of type "Sys.Binding"

I couldn't find anyinformation on these error message, and I assumed there was some problem in theinstallation. When I included the "EnablePartialRendering"attribute it solved the problem. I'msure as the Atlas documentation expands, this issue will be covered morethoroughly.

Thaks to Scott Gu and Matt Gibbs for taking some time to respond to my questions about it.
It is possibly related with this problemhttp://forums.asp.net/thread/1243525.aspx

UpdateProgress stops working after first firing

Running locally, my apps work fine. When I deploy to a remote server, my UpdateProgress controls stop working or work intermittently. The server is IIS6 on 2003. Sharepoint is running on the server but I have added scriptresource.axd and webresource.axd to excluded paths. Latest version of Ajax is installed. Seperate app pool. The hard thing is it works locally!! What else can i look at?? Here is the source:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="UPTest.aspx.cs" Inherits="UPTest" %><!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></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server"></asp:Label> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0" runat="server"> <ProgressTemplate> <img alt="progress" src="Images/indicator_green.gif" /> </ProgressTemplate> </asp:UpdateProgress> </ContentTemplate> </asp:UpdatePanel> </form></body></html>

-----------

using System;using System.Web.UI.WebControls;public partialclass UPTest : System.Web.UI.Page{protected void Button1_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(5000); Label1.Text = DateTime.Now.ToLongTimeString(); }}

I'm getting this issue as well.

Any one know of a fix / explanation?


i am experiencing this as well.

anyone??


NOTE: fixed this issue by adding the "DisplayAfter" property w/any value

<

asp:UpdateProgressID="progressPanel"DisplayAfter="1"runat="server">
Unfortunately this did not work for me...has anyone else found another solution to this by any chance?

I ended up just using the javascript events in the end to show and hide a div.

think they're called onbeginrequest and onendrequest or something similar

HTH


Ok, call me dense, but I am not seeing this event anywhere in the scriptmanager, updatepanel, or updateprogress control...could you point me in the right direction please?

http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/PageRequestManagerBeginRequestEvent.aspx

http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/PageRequestManagerEndRequestEvent.aspx


Martin,

Thank you for this....I thought you had it solved for me, but it seems I have hit another snag. It seems that after the first call the div I am using is removed from the DOM rather than just being set to hidden. I can no longer find it in the DOM inspector thus my Javascript call can not find the element the next time the panel comes around...what is strange is that it is being removed before the EndRequestHandler is called...so there must be an event between BeginRequestHandler and EndRequestHandler that seems to be removing the element from the DOM. Did you run into this problem or am I just lucky ;-)

Thanks in advance,

Josh


Is your div inside the Update Panel itself?

If so it may be getting replaced by the contents of the Ajax call.


Unfortunately I wish it was as trivial as that, but it is not inside my update panel. I am quite lost on what could be doing this...

Josh


Ok I have worked on this all day today and have made noprogress...here is my code, please someone tell me what I am doingwrong...
1<%@. Page Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs"2 Inherits="Default2" Title="Untitled Page" %>34<%@. Register src="http://pics.10026.com/?src=Modules/MainNavigation.ascx" TagName="MainNavigation" TagPrefix="uc1" %>5<%@. Register src="http://pics.10026.com/?src=Modules/Products/ProductSummaryDisplay.ascx" TagName="ProductSummaryDisplay"6 TagPrefix="uc2" %>7<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">8 <asp:ScriptManager ID="ScriptManager1" ScriptMode="Release" EnablePartialRendering="true" runat="server">9 </asp:ScriptManager>1011 <script type="text/javascript">12 Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);13 Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);14 function BeginRequestHandler(sender, args)15 {16 var elem = args.get_postBackElement();17 ActivateAlertDiv('visible', 'AlertDiv');18 }19 function EndRequestHandler(sender, args)20 {21 ActivateAlertDiv('hidden', 'AlertDiv');22 }23 function ActivateAlertDiv(visstring, elem)24 {25 var adiv = $get(elem);26 adiv.style.visibility = visstring;27 }28 </script>2930 <div id='leftcontent'>31 <uc1:MainNavigation ID="MainNavigation1" runat="server" />32 </div>33 <div id='centercontent'>34 <div class='sectionheader'>35 <a href="<%=Page.ResolveUrl("~/default.aspx")%>">Home</a> >><asp:Label ID="lblBreadCrumb"36 runat="server"></asp:Label></div>37 <asp:UpdatePanel ID="UPanel1" ChildrenAsTriggers="true" runat="server" UpdateMode="conditional">38 <ContentTemplate>39 <asp:Panel ID="Panel1" runat="server" Height="50px" Width="700px" HorizontalAlign="Center">40 <div style="float: left;">41 <asp:LinkButton ID="btnDecreasePage1" runat="server" OnClick="btnDecreasePage1_Click"><< Previous ></div>42 <div style="float: left;">43 Page44 <asp:Label ID="lblCurrPage1" runat="server" Text="1"></asp:Label>45 of46 <asp:Label ID="lblTotalPages1" runat="server"></asp:Label></div>47 <div style="float: left; clear: right;">48 <asp:LinkButton ID="btnIncreasePage1" runat="server" OnClick="btnIncreasePage1_Click"> Next >></asp:LinkButton>49 </asp:Panel>50 <div style="float: right">51 Num Products Per Page:<asp:TextBox ID="txtProductsPerPage" runat="server" Text="6"52 AutoPostBack="true" MaxLength='4' Width="3em" OnTextChanged="txtProductsPerPage_TextChanged"></asp:TextBox> </div>53 <br />54 <asp:DataList runat="server" ID="productList" RepeatColumns="3" RepeatDirection="Horizontal"55 EnableViewState="False">56 <ItemTemplate>57 <uc2:ProductSummaryDisplay ID="ProductSummaryDisplay1" runat="server" ProductGUID='<%# Eval("ProductGUID")%>'58 ProductName='<%# Eval("ProductName")%>' ImageFile='<%# Eval("imageFile")%>'59 ProductID='<%# Eval("productID")%>' OurPrice='<%#Eval("OurPrice")%>' RetailPrice='<%#Eval("RetailPrice")%>'60 ShippingEstimate='<%#Eval("ShippingEstimate")%>' Rating='<%#Eval("Rating")%>'61 SKU='<%#Eval("SKU")%>' />62 </ItemTemplate>63 </asp:DataList>64 <asp:Panel ID="Panel2" runat="server" Height="50px" Width="250px" HorizontalAlign="Center">65 <div style="clear: left; float: left;">66 <asp:LinkButton ID="btnDecreasePage2" runat="server" OnClick="btnDecreasePage1_Click"><< Previous ></div>67 <div style="float: left;">68 Page69 <asp:Label ID="lblCurrPage2" runat="server" Text="1"></asp:Label>70 of71 <asp:Label ID="lblTotalPages2" runat="server"></asp:Label></div>72 <div style="float: left">73 <asp:LinkButton ID="btnIncreasePage2" runat="server" OnClick="btnIncreasePage1_Click"> Next >></asp:LinkButton>74 </asp:Panel>75 </ContentTemplate>76 </asp:UpdatePanel>77 <div id="AlertDiv" class="loadingbox" style="visibility:hidden;">78 <img src="images/spinner.gif" align="absmiddle" />  Processing...79 </div>80 </div>81 <div id='rightcontent'>82 </div>8384</asp:Content>85

Thank you in advance,

Josh


Your manual show/hide should work. The fact it isn't could be for the same reason the UpdateProgress wasn't working. Examine your document for possible missing closing tags, etc. Look at the rendered html instead of the aspx. Inside the update panel, the "<<" and ">>" in your next/previous buttons looks suspect. Encode them as >> and << (they almost look like html tags otherwise). If you have any <script src="http://pics.10026.com/?src="> tags make sure they are not of the self-closing variety. For example <script src="http://pics.10026.com/?src=.." type="text/javascript"></script>, not <script src="http://pics.10026.com/?src=.." type="text/javascript" />.

Is $get(elem) returning an element or null?


Well you sir hit the nail on the head, I had some open tags. It wasn't showing up on source view as an issue strangely enough. I just went down one by one.

Also thank you for pointing out my glaring mistake with the >> and <<, that is not normal practice for me in my defense....

Thanks again!

Monday, March 26, 2012

Updating and ASP Textbox from Server Side Script using AJAX Extensions

I've searched the web extensively and cannot find an answer to a question that I believe is simple.

I have an application running AJAX extensions so that scripts are run at server side. Everything works great. The problem I have is that based on selections in the script I need to base data to ASP.NET VB code behind to intergrate with an existing application.

Quite simply I want to update a hidden textbox then use that data to pass along to another asp page. I know how to pass the data once I get it to and ASP control. Just need to get it to the ASP side of the server.

Thanks in advance for any help.

Brian

I solved my problem.

Make sure there is an Name tag on the textbox that you will be using to pass info to code behind

This will accept a value and display it.

<inputtype="text"id="textbox1" value="JavaScript JumpStart"runat=server>

If you want to use the value in the code behind file this is what you need.

<inputtype="text"id="textbox1"name="textbox1"value="JavaScript JumpStart"runat=server>

Note the addition of the name tag.

Updating progress ?

Hi!

Is it possible to write such page that will be updating [rendering] itself during some long running process ?
For example:

void ExecuteLongRunning()
{

for(int i=0; i < 50 ; i++){
RenderSomeText();
Thread.Sleep(10000);

}

}

I'd like to see the text after each execution of RenderSomeText is it possible and how to do it :)

Jarod

I think it is possible to implement it. Here are some sample codes for your reference.
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="lblUpdateProgress" runat="server" Text="This is a asp:UpdateProgress testing"></asp:Label>
<asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnUpdate" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<span style="display: block;">
<asp:UpdateProgress ID="UpdateProgressOne" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/airplane.bmp" />
</ProgressTemplate>
</asp:UpdateProgress>
</span>
</div>

Behind Codes:

protected void btnUpdate_Click(object sender, EventArgs e)
{
???for(int i=0; i < 50 ; i++){
???RenderSomeText();
???Thread.Sleep(10000);
???}
}

Wish the above can help you.

I'll use your example :) To show you what I really need so take a look at implementation of my RenderSomeText()

protected

void btnUpdate_Click(object sender,EventArgs e)

{

for (int i = 0; i < 50; i++)

{

RenderSomeText();

Thread.Sleep(10000);

}

}

privatevoid RenderSomeText()

{

lblUpdateProgress.Text +=

DateTime.Now.ToString();

lblUpdateProgress.Text =

"\r\n";

}

What I want to see on a page is updated "label" every time I press a button. So right after RenderSomeText() executes. My friend told me how to get such result using asynchronous delegate invocation. But maybe there is a better way of doing it ?

Jarod


I can't continue to help you for business.Try to post your issues with a new thread.This may?be?better?for you?to?solve?this?issue.

Saturday, March 24, 2012

Upgrade from Beta

Hi ive got a server that is running ASP.NET 2.0 AJAX Extensions Beta 2,

ivebuilt a new app using the official release 1.0, when I place the new framework on the server will it cause any issues on my existing app as they will be runing side by side?

I believe that during the installation of the latest version, you will be prompted to remove the old version first. So you will need to upgrade your existing app first.

I'm not sure if copying the dlls directly from where you installed them on your machine and pasting them into the server's GAC would work or not, but it's worth a shot. Technically they're different versions and should be capable of being installed side-by-side, but the installer doesn't allow it.


There are migration guides availablehere. Side by side install is not supported. You need to upgrade to ASP.NET AJAX 1.0.

Upgrading from atlas to ajax extensions 1.0

Hello

I have some projects wich I build in Atlas and are already finished and properly running on my server.

I want to updatethe server in order to runNEW asp.net applications using AJAX.

Question: If I upgrade mySERVER to Ajax Extensions, will my existing Atlas projects (wich I don't plan to modify) still run fine?

Thanks

Well,

As I remember that in Atlas, all the dlls are in the bin folder; and the new AJAX, everything is in the GAC. I don't think there will be a problem if you install AJAX on your server, because you don't even use it. And if you don't intend to modify anything, then don't bother installing Ajax on your server.

But if you do sometimes in the future, then you need to modify your .aspx pages including the Web.Config file;

The new one has more to offer ... ..... good luck ......


Please also refer to : http://ajax.asp.net/documentation/default.aspx?tabid=47

See section Migration Guides


Wednesday, March 21, 2012

Use Asp.net ajax with running the installation program.

Can asp.net ajax be deployed to a production server via a xcopy operation (as part of the application)? Is it possible to deploy without having to have the server admins run the ajax installation program on the production server?

Thanks

Copy the System.Web.Extensions and System.Web.Extensions.Design from the GAC of your local pc into the bin directory of you production server. Ensure that your web.config has the required setting for Ajax Framework.

How to copy System.Web.Extensions and System.Web.Extensions.Design from GAC? Can I copy this assemblies from C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025?

Whats the "required settings"?

Is that enough:

<?xmlversion="1.0"?>

<configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<configSections>

<sectionGroupname="system.web.extensions"type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<sectionGroupname="scripting"type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<sectionname="scriptResourceHandler"type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

<sectionGroupname="webServices"type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

<sectionname="jsonSerialization"type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="Everywhere"/>

<sectionname="profileService"type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

<sectionname="authenticationService"type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"requirePermission="false"allowDefinition="MachineToApplication"/>

</sectionGroup>

</sectionGroup>

</sectionGroup>

</configSections>

<system.web>

<pages>

<controls>

<addtagPrefix="asp"namespace="System.Web.UI"assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addnamespace="AjaxControlToolkit"assembly="AjaxControlToolkit"tagPrefix="ajaxToolkit"/>

</controls>

</pages>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

-->

<compilationdebug="true">

<assemblies>

<addassembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addassembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

<addassembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>

</compilation>

<httpHandlers>

<removeverb="*"path="*.asmx"/>

<addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addverb="*"path="*_AppService.axd"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"validate="false"/>

</httpHandlers>

<httpModules>

<addname="ScriptModule"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</httpModules>

</system.web>

<system.web.extensions>

<scripting>

<webServices>

<!-- Uncomment this line to customize maxJsonLength and add a custom converter-->

<!--

<jsonSerialization maxJsonLength="500">

<converters>

<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>

</converters>

</jsonSerialization>

-->

<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate.-->

<!--

<authenticationService enabled="true" requireSSL = "true|false"/>

--><!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and

writeAccessProperties attributes.-->

<!--

<profileService enabled="true"

readAccessProperties="propertyname1,propertyname2"

writeAccessProperties="propertyname1,propertyname2" />

-->

</webServices>

<!--

<scriptResourceHandler enableCompression="true" enableCaching="true" />

-->

</scripting>

</system.web.extensions>

<system.webServer>

<validationvalidateIntegratedModeConfiguration="false"/>

<modules>

<addname="ScriptModule"preCondition="integratedMode"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</modules>

<handlers>

<removename="WebServiceHandlerFactory-Integrated"/>

<addname="ScriptHandlerFactory"verb="*"path="*.asmx"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addname="ScriptHandlerFactoryAppServices"verb="*"path="*_AppService.axd"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<addname="ScriptResource"preCondition="integratedMode"verb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</handlers>

</system.webServer>

</configuration>

Thanx

use httpHandler of AJAX in web application

Hey all,

I want to implement AJAX in my current running web application.

I am going to use .

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>

in my web application.

I want to know ...

(1). will there be any side effect of the above code,

(2) will my current functionality got affected.

(3)what this code is all about and what it does.

1. No your should not see any side effects

2. The functionality should remain intact.

3. All this does is tell the webserver that when it gets a request for an .asmx page, to use the System.Web.Script.Services.ScriptHandlerFactory, and System.Web.Extensions classes to handle the request. for all verbs. So you .aspx, .ascx, etc will go unchanged and will continue to use the default HttpHandler. It then tells the web server to that when you recieve a GET or HEAD request for the ScriptResource.axd to use the System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions classes to handle te request. But since these classes extend the default classes that would normally handle the .asmx requests, then all your existing .asmx requests will work as originally intended. The above classes add the ability to JSON serialize requests for use with AJAX webservice calls.

Hope this helped clear things up.


thnx aquillin.

When I was not using the above code , I was getting error like "sys is undefined".
Yesterday I was reading an article and it said that the code generates the required javascript as AJAX uses it.

you said "All this does is tell the webserver that when it gets a request for an.asmx page, to use the System.Web.Script.Services.ScriptHandlerFactory...........,"

I have one dought that what is the link of .asmx (asp.net web services here). I am not using any web service .

Am i using them as hidden ?


The code actually doestwo things. One is the handling of .asmx web services. The other is handling of calls to ScriptResource.axd. That's required to deliver the Microsoft AJAX Library to the client.

It shouldn't affect your application unless for some reason you were already using something called ScriptResource.axd (extremely unlikely, but just being complete).