Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Wednesday, March 28, 2012

ViewState and Atlas

Hi

I encountered a problem involving viewstate and PageMethods (web methods in an aspx page).

I was submitting some control values, only one control on the page is designed as a <asp:listbox />, the rest of the controls are generic HTML. While Atlas.js constructed the proxy to the PageMethod and the arguments (Web.Net.PageMethodRequest) the Atlas.js javascript does some sort of check on the page controls, in which viewstate is a hidden input, adding it to a dictionary (refer line 3495 in Atlas.js)

Some sort of exception is generated but no information is available to determine the source. The code behind to the PageMethod didn't get hit in debug mode and it wasn't until I inspected the request/response in Fiddler that I came across a message indicating a corrupted viewstate.

After disabling viewstate on the <asp:listbox> the request got through to my [WebMethod] in the code-behind.

There is a problem with PageMethods and viewstate, or have I missed something.

Craig

An update for those who might be encountering the same problem with altas (Jan-06 CTP) and ViewState.

As mentioned in my previous post, in the file Atlas.js on line 3495, a procedure adds to the variable bodyDictionary all 'submittable' HTML element e.g <input /> this includes <input type="hidden" /> which means that<inputid="__VIEWSTATE" /> is added to the bodyDictionary variable.

Next in the procedure, is a call Web.Net.WebRequest.createQueryString(bodyDictionary, ...);

This is where IMHO the viewstate corruption is occuring between the client service calls to the server. In my case, I make a call to a [WebMethod] which is contained in an aspx page. So my client function is something like this:

functionfoo() {
PageMethod.GetFoo('hello');
}

My aspx.cs [WebMethod] is like the following:

[WebMethod]
public string GetFoo(string text) {
return text+=" get foo";
}

My page wrapes a user control in an<atlas:UpdatePanel>the user control contains an<asp:Repeater>control.

Has anyone experienced this, or am I the lucky one? To avoid the error 500, I removed the check for HTML elements with a type of hidden. But I'm not sure if this is a good thing...

Craig

PS: I can post the stack trace for those who might be interested.


Further, using PageMethod seems to faciliate the viewstate corruption. for kicks I moved the [WebMethod] from the aspx page into an ASMX file, reversed my Atlas.js script hack and the viewstate problem has gone. I hope the PageManager is a little more robust in the rtm.


Hi,

I'm not able to reproduce the behavior that you described. Could you post the stack trace and also the relevant page code?

Hi Garbin

Stack Trace
[FormatException: Invalid length for a Base-64 char array.]
System.Convert.FromBase64String(String s) +0
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +72
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
System.Web.UI.ClientScriptManager.EnsureEventValidationFieldLoaded() +172

[ViewStateException: Invalid viewstate.
Client IP: 127.0.0.1
Port: 3520
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
ViewState: /wEWCAKbhpuAAgLEtM6pBgLN/7aVCAKe4MuSDQLL7+H/CgLL7 3/CgKs5ZucDgLNoqBMLo1Lj5/N S5y dQM87L I5JMzQ=
Referer:http://localhost/Unsd/COC/ExchangeRateView.aspx?countryCode=36
Path: /Unsd/COC/ExchangeRateView.aspx]

[HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.ClientScriptManager.EnsureEventValidationFieldLoaded() +209
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +67
System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +106
System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +31
System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +408
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.exchangerateview_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\unsd_coc\bdef81f1\ee1d3cb5\App_Web_ytigk7vl.8.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Page Code (aspx.cs)
[WebMethod]
publicExchangeRate GetExchangeRate(int countryCode,int year) {
returnCountryManager.Instance.GetExchangeRate(countryCode,
newint[] { year });
}

Page Code (aspx - javascript)
function GetExchangeRate(countryCode, year) {
// Call the server.
PageMethods.GetExchangeRate(countryCode, year, RequestCallback);
}

function RequestCallback(exchangeRate) {
// Bind the result to the controls.
document.getElementById("ctl00_contentPlaceholder_textboxYear").value = exchangeRate.Year;
document.getElementById("ctl00_contentPlaceholder_textboxIMF").value = exchangeRate.IMF;
document.getElementById("ctl00_contentPlaceholder_textboxUNOP").value = exchangeRate.UNOP;
document.getElementById("ctl00_contentPlaceholder_textboxOther1").value = exchangeRate.Other1;
document.getElementById("ctl00_contentPlaceholder_textboxOther2").value = exchangeRate.Other2;
document.getElementById("ctl00_contentPlaceholder_textboxNote").value = exchangeRate.Note;
}

Page Code (aspx - html)
<!-- Exchange Rate Control -->
<atlas:UpdatePanelID="updatePanelExRate"runat="server"Mode="Conditional">
<ContentTemplate>
<unsd:ExchangeRateControlid="exchangeRateControl"runat="server"/>
</ContentTemplate>
<Triggers>
<atlas:ControlEventTriggerControlID="buttonSave"EventName="Click"/>
</Triggers>
</atlas:UpdatePanel>

The ExchangeRate control is populated in the Page_Load event of the aspx Page by passing an array to a property accessor in the control, the array provides is the data source to a repeater. The ItemTemplate in the repeater contains a link to invoke the GetExchangeRate javascript in the page (above).

Hope this helps.

Craig


I don't know if its the same issue or not, but viewstate corruption is rampant in the QuickStart tutorials... There were several times where I ran 3 or 4 different "run this" tutorials in a row only to have the viewstate corruption error message appear on me. Sometimes it was fixed with a refresh of the page, sometimes it never went away.
hi Guys...
even i got the same problem when i put my [webmethod] in code behind.i tried removing type=hidden from atlas.js line 3495 and it is working.please let me know for the solution as we just can not remove any thing from coreatlas files even though doing the same results in expected output.

thanks
Jaideep

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


I have a similar problem with teh session state.

I have narrowed it down to a web user control that raises an event.

The code behind that implements the event sets the session var and then does a redirects.

on the redirect page the session state is blown away. cant figure out why

steps to reproduce

- create a web user control (define an event and raise it)

- create a page and place the wuc on it (trap for the wuc event and set a session var and do a redirect to 2nd page

- in 2nd page Page_load check the session state

ViewState of CollapsiblePanelExtender

I have several collapsible panels on a web form, and I cant seem to get them to remember their viewstate. Am I missing something or is this not possible?

Here is an example:

<asp:Content ID="Content2" ContentPlaceHolderID="DetailContentPage" Runat="Server"><div style="margin-left:10px"> <asp:Panel Width=100% ID="mainPanel" runat=server > <table width=100% align="left" cellspacing=0 cellpadding=10 > <tr> <td> <asp:Panel ID="ResHeaderPanel" runat="server" CssClass="formPanelHeader" Height="32px"> <div style="padding:5px; cursor: pointer;" > <div style="float:left; margin-top:4px;"> <asp:Image ID="imgResArrow" runat="server" ImageUrl="~/images/expand.jpg"/> </div> <div style="float:left; margin-left:6px; vertical-align:middle;">Engine Settings</div> <div style="float:left; margin-left:30px; margin-top:4px; font-size:x-small" > <asp:Label ID="lblResHeaderHint" runat="server">(Show Details...)</asp:Label> </div> </div> </asp:Panel> <asp:Panel ID="ResPanel" runat="server" CssClass="formPanel"> <table> <tr> <td width=200px>Number of Rooms:</td> <td width=70%><asp:TextBox ID="txtNumRooms" runat="server" MaxLength=200 width=70% /></td> </tr> <tr> <td>Time Zone: </td> <td><asp:TextBox ID="txtTimeZone" runat=server MaxLength=200 width=70%/></td> </tr> <tr> <td>form controls removed </td> <td></td> </tr> <tr> </table> </asp:Panel><!-- ******************************** --> <asp:Panel ID="ContactheaderPanel" runat="server" CssClass="formPanelHeader" Height="32px"> <div style="padding:5px; cursor: pointer;" > <div style="float:left; margin-top:4px;"> <asp:Image ID="Image1" runat="server" ImageUrl="~/images/expand.jpg"/> </div> <div style="float:left; margin-left:6px; vertical-align:middle;">Contact Details</div> <div style="float:left; margin-left:30px; margin-top:4px; font-size:x-small" > <asp:Label ID="lblContactHeaderHint" runat="server">(Show Details...)</asp:Label> </div> </div> </asp:Panel> <asp:Panel ID="ContactPanel" runat="server" CssClass="formPanel"> <table> <tr> <td width=200px>Address:</td> <td width=70%><asp:TextBox ID="txtAddress1" ReadOnly=false runat="server" MaxLength=200 width=70% /></td> </tr> <tr> <td>Address: </td> <td><asp:TextBox ID="txtAddress2" runat=server MaxLength=200 width=70%/></td> </tr> <tr> <td>form controls removed </td> <td></td> </tr> </table> </asp:Panel> </td> </tr> </table> <ajx:CollapsiblePanelExtender ID="cpeRes" runat="Server" TargetControlID="ResPanel" ExpandControlID="ResHeaderPanel" CollapseControlID="ResHeaderPanel" TextLabelID="lblResHeaderHint" ExpandedText=" " CollapsedText="(Click to Show Details...)" ImageControlID="imgResArrow" ExpandedImage="~/images/collapse.jpg" CollapsedImage="~/images/expand.jpg" EnableViewState=true SuppressPostBack="true" /> <ajx:CollapsiblePanelExtender ID="cpeContact" runat="Server" TargetControlID="ContactPanel" ExpandControlID="ContactHeaderPanel" CollapseControlID="ContactheaderPanel" TextLabelID="lblContactHeaderHint" ExpandedText=" " CollapsedText="(Click to Show Details...)" ImageControlID="imgContactArrow" ExpandedImage="~/images/collapse.jpg" CollapsedImage="~/images/expand.jpg" EnableViewState=true SuppressPostBack="true" /> </asp:Panel></div></asp:Content>
 
 
 -Steve 


I'm assuming your saying that when you open one, the other one closes. If so, try this: remove the "EnableViewState=true" from your code and wrap the entire thing in an update panel. I have similar yet I have no troubles with it but mine is wrapped in an update panel.


Thanks for the reply,

That is not quite what I was aiming for. I just wanted the state (open or closed) of the panels to be preserved after postbacks and navigation in my application.

I have a large form, that fills even a high res screen, I split the form into several collapsible panels, so that the user can show and hide the sections that are interesting. Then as the user navigates application records, and postbacks occur, I wish the state of each panel to be preserved.

Maybe I need to manually store the state to the Session and I am misunderstanding the scope of view state?


-Steve


If I understand correctly the panels are closed when you do a postback. This is because a postback reloads the controls. You want to do a partial postback, not a full postback. Therefore, wrap everything in an UpdatePanel, set the updatepanel's updatemode="conditional" and set the ScriptManager to enablepartialrendering="true"

This will cure the headache of a postback. Also with navigation it will have to be in updatepanels. Anything that does a postback must be eleminated and moved into the AJAX portion using update panels and such, otherwise the page will do a complete postback. Overall, the logic behind how things are to be setup with AJAX is a bit more work but the results is well worth it.

^_^


Thanks for the advice, this is the effect that I want to acheive, however I am using a Master page with content pages, linked to a site map based navigation. I trawled the web and could find no examples of the kind of site templete being used with AJAX.

Do have any advice for trying to achieve this? Otherwise the best solution would be to store the panels state to the Sessions, although this seems clunky and I would have thought that the controls would respect viewsate acress postbacks.

-Steve

Virtual Earth Connection/Event Problem When Nested In AJAX Control

Well, I was told today that I needed to make a web portal by the end of the month using .net technologies (my handle says it all) and I just hit my first roadblock.

In a condensed nutshell, I am trying to implement theVirtual Earth tool in an asp.net ajax tab control. When the VE <div> is located outside of the tab control then it works, but when I try to load it inside of the TabPanel it doesn't scroll properly and doesn't refresh.

I clipped out everything from my default.aspx except for the problem (below). Help is very much appreciated.

===================== SOURCE =================

<%@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_Default"%> <!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <scriptsrc="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=4"></script> <scripttype="text/javascript">var map =null; function GetMap() { map =new VEMap('myMap'); map.LoadMap(); }</script> <htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"> <title>Map</title> <metahttp-equiv="Content-Type"content="text/html; charset=utf-8"></head><bodyonload="GetMap();"> <formid="form1"runat="server"> <ajaxToolkit:ToolkitScriptManagerID="ScriptManager1"runat="server"> <Scripts> <asp:ScriptReferencePath="Map.js"> </asp:ScriptReference> </Scripts> </ajaxToolkit:ToolkitScriptManager> <ajaxToolkit:TabContainerID="TabContainer1"runat="server"ActiveTabIndex="0"ScrollBars="Auto"> <ajaxToolkit:TabPanelID="TabPanel1"runat="server"HeaderText="Map Tab"> <ContentTemplate> <divid='myMap'style="position: relative; width: 400px; height: 400px;"/> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer> </form></body>

</html>

===================== END SOURCE =================

I had the same problems working with TabContainer Control and Virtual Earth Control .

A workournd I have found that partially solves this issue is to remove the code

ActiveTabIndex="0"

from the definition of the TabContainer control.

You may find more info on this on this URL :

http://www.dotnetside.org/blogs/lucab/archive/2007/10/05/Mappe-di-Virtual-Earth-e-controllo-Tabs-di-AJAX-Control-Toolkit.aspx

George

Monday, March 26, 2012

Vista w/ vs2005 & Ajax

Is there anyway to allow ajax tag prefixes as asp without having designer errors when declared in web.config or page? I'm running as administrator and have sp1 (kb926601) and the vista patch (kb932232) installed

ex:
no errors in designer:
<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="ajax" %>

causes errors in designer:
<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>


Hi,

As far as I know, the ajax extension has a tagprefix "asp" by default, so it's not necessary to specify it.

And I also tried both, they all work fine.

vista, ajax 1.0 release and web application projects - no intellisense

Hi,

Is anyone else having problems getting intellisense working with the 1.0 release and web appliation projects?

I should add this is on vista and vs2005 sp1 is not installed

Sometimes it seems to be available after switching from design view back to source but not always, also it seems to be worse where a master/child page is used - often when I drop an update panel onto the source its id does not get auto populated? and no intellisense is available?

Any advice welcome

thanks

Richard

You need SP1, and there is another update for vista that you will need. Also, you may need to delete some user data for visual studio.

Visual Basic Examples Echo Name on web and in documentation down load does not work

I have done a clean reinstall of Visual Studio 2005, the SP1, The vs2005 Vista Update (Home Premium Vista), and IE 7.00..

One of the four Simple Web Service examples in the documentation download did not work, and as Mr. Murphy acknowledges, it's the one I am interested in.

I made sure not to touch any code .. just install and then debug..

http://localhost:49160/aspDocumentation/Samples/Sys.Net.SimpleWebService/vb/SimpleWebService.aspx

did not echo

This example also does on work on theasp website.

http://localhost:49160/aspDocumentation/Samples/Sys.Net.PageMethod/vb/PageMethod.aspx

did echo

http://localhost:49160/aspDocumentation/Samples/Sys.Net.SimpleWebService/cs/SimpleWebService.aspx

did echo

http://localhost:49160/aspDocumentation/Samples/Sys.Net.PageMethod/cs/PageMethod.aspx

did echo

Thanks!




Hi,

Can you tell me which documentation are you referring to?

Look forward to your reply.


http://ajax.asp.net/docs/tutorials/ExposingWebServicesToAJAXTutorial.aspx

Simple Echo works in C# but not in VB


Can you be more specific about your vb sample doesn't work? And how is it related to Vista?

It will be better if you canshow me a sample.


1. Go tohttp://www.asp.net

2. Click on AJAX.

3. You are now at the page titled:

"AJAX: The Official Microsoft ASP.NET AJAX Site

4. Click on "Docs"

5. Click on "Open The Online Documentation"

6. On The ASP.Net AJAX Roadmap page go to the fifth section titled "Web Services" and click

on the second item "Exposing Web Services To A Client Script"

7. On the top right side of the page select C# as the "Preferred Sample Language"

8. Go to the middle of the page to the paragraph that is titled:

Exposing Web Services to Client Script in an ASP.NET Web Page

9. At the bottom of the paragraph are two buttons, a run it button and a script button.

10. Click on Orange Button "Run It"

11. Enter your name and click on echo

12. close the "Simple Web Service" window

13. You have returned to the Exposing Web Services to Client Script in an ASP.NET Web Page

14. On the top right side of the page select Preferred Sample Language and select Visual Basic

15. Click on the same "run it" option that you did in step 10.

16. Enter your name and click on echo

17. Nothing happens.. Why?


Thanks for your clear explanation.

Now I've noticed it too, and I copy and paste the vb source code into a local project, it works.

And this sample should already give you an idea of how to expose webservice to client side.


You must be doing something in your local project setup, or your config file, or something.. why doesnt it work on the web?

In addition, when you download the "tutorial" the example, like the web, it does not work. Why?

If Microsoft has a "official" AJAX tutorial, one would think their examples would work. At least I think they should work..

Why does the C# example work and the VB example not work?

Could you locate the group that put together this "example" and tell them it doesnt work?

Thanks


Thanks for your feedback. I have checked the document and I found thatthe service entry registered in the ScriptManager has a invalid path.

<asp:ScriptManager runat="server" ID="scriptManager">
<Services>
<asp:ServiceReference path="SimpleWebService_VB.asmx" /> <%--should be SimpleWebService.asmx--%>
</Services>
</asp:ScriptManager>

To feedback this document issue in a formal way, could you go to our Connect portal site and submit it? http://connect.microsoft.com/ Every feedback submitted will be evaluated carefully by our engineers and document writers. They will let you know their comments further through that portal. It would be great if you can also paste the link to the submitted feedback here, so that other community members can see it as well.

Visual web developer & AJAX Templates

Somehow i used to have thew ajax template installed in Web developer express (when you go to new web site). i had to reinstall web developer express the other day and the template has disappeared.

I look at the documentation and and it states that during the install if you have web developer express or visual studio it will launch the visual studio content installer.

This is not happening!!

Any ideas i am pulling my hair out now

Cheers

How about just re-downloading (if needed) the Atlas.msi and re-running the install to reinstall the templates?

hello.

or, go to the atals installation folder and run the vsi template. that should automatically add the template to vs.

visual web developer 2005 express

Hi,

will the sample control toolkit work in visual web develoer? i installed the ajax .net rc1, control sample web site, latest ctp. When i open and run the sample project, it shows no error and displays the controls. but, the none of the controls is working.

thanks

it will work under visual web developer

do you see any javascript error?


No. there is no compilation, runtime or javascript error. But, it the sample controls still not working

thanks

VS 2005/MS Ajax Beta Application no longer runs on Live server but does in Dev. Help!

I have just migrated from Atlas to MS Ajax Beta and after a lot of hassle to get the application working I decided to publish to our test web server. When I go to the URL for our test server all I get is a blank page but the IE progress bar (the bar at the bottom that show the page loading status) just flickers like crazy. It works fine on my dev machine but as soon as I publish it, no joy!

I really need some help on this as I don't really have a clue and I don't really fancy having to roll back to Atlas just to get this to work live.

Cheers,

FF

Ignore me, I'm stupid!!

I hadn't checked if the extensions were installed on the server!! DOH!!!


hello.

well, you must install ajax extensions on the live server and configure your site to use asp.net 2.0. have you done that already?

VS Editor does not recognize Atlas tags

This is what I have in web.config:

<controls>

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

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

<addtagPrefix="asp"namespace="Microsoft.Web.Preview.UI"assembly="Microsoft.Web.Preview"/>

<addtagPrefix="asp"namespace="Microsoft.Web.Preview.UI.Controls"assembly="Microsoft.Web.Preview"/>

</controls>

This is my aspx page:

<asp:ScriptManagerID="ScriptManager1"EnablePartialRendering="true"runat="Server">

</asp:ScriptManager>

This is the error I am getting in VS:

Error 1 Element 'ScriptManager' is not a known element. This can occur if there is a compilation error in the Web site. C:\Documents and Settings\RAFAL\My Documents\development\RFMain\ImportData\MainSite\Auctions.aspx 53 10 http://localhost/ekit/

Oh, I have figured this out. It was coming from master page. This line was creating problem:

<style>

.row {

background-color:white;

}

.rowSelected {

background-color:gray;

}

</style>


hi

could you (or anyone else) explain what you changed to make this work? What was the couse of your problem?

I have the same problem but I don't understand your fixit post and I can't see how that relates to what I have here.

cheers

A


hi.

I have a similar problem here.If my page has a master page then I can't get to see the ajax tags in the content page. If the page doesn't have a master page then i can see the ajax tags.

I can't understand how your fix works - would you (or anyonw) be able to explain why it solves the problem?

cheers

A


Seems like if there is any syntax problem on the page or the master page, that is when it is happening. Not sure how to find that original syntax problem. Maybe somebody else can recommend... Try to check manually for all HTML/ASP tags, make sure all is correct, that is what I can recommend now. Do it for the page and master as well as those are joined together later...

walkthrough problems

I have just completed my first Atlas Walkthrough using Visual Web Developer 2005 Express Edition . I choseWalkthrough: Creating a Basic ASP.NET 'Atlas' Web Application.There were a few places where I floundered.

I accidently copied both the [Visual Basic] and [C#] code fragments. Perhaps there could be a sentence dividing them.

I didn't find the following instruction very clear:

"Add a new ASP.NET page to your project and name it AtlasScript.aspx.

Note Be sure that you clear thePlace code in separate file check box. For this walkthrough, you must create a single-file ASP.NET Web page."

Compare it with the earlier precise instructions:

"In Solution Explorer, right-click the name of the site, and then clickAdd New Item.

In theAdd New Item dialog box, underVisual Studio installed templates, selectWeb Service.

Name the file HelloWorldService.asmx and clear thePlace code in separate file check box.

Select the language you want to use.

ClickAdd."

At the end, I was unsure how to run theAtlasScript.aspx page. Through trial-and-error I right-clicked the AtlasScript.asx in Solution Explorer and chose "View in Browser".

Then the script wouldn't work. There were two problems.

The first I solved by changing the functionDateTime.Now toDate.Now. This needs to be changed in the walkthrough instructions.

The other problem was that you cannot pressEnter on the keyboard, you have to click theSearch button. It is almost subconsciously-automatic to press Enter, so it would be better if it was enabled.

I have not completed my first Atlas Walkthrough using Visual Studio 2005. My experiences are similar to yours with the difference that I get stopped at the error message: Validation (XHTML 1.0 Transitional): Element 'title'occurs too few times. Error occurs in AtlasScript.aspx line 7 containing <head id="Head1" runat="server">. Any idea?

asalisse

Saturday, March 24, 2012

want to use AJAX Control & .....

Hi everyone

I have developed web application without using AJAX.it is completed.

Now, I want to use AJAX functionality & tool kit controls.

SO, what are changes, I have to make in web.config or a particular web page.

Please help me out,

Regards,
ASIF

Hi,

you can take a look at this page:http://asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx or you can create a new website based upon the AJAX web site template and use a tool like winmerge to copy over the needed differences in the web.config file.

Grz, Kris.


How Do I: Add ASP.NET AJAX Features to an Existing Web Application? : The Official Microsoft ASP.NET 2.0 Site

hope it helps./.

Want to use something other than a xmldocument to feed the cascading dropdown list

I'm starting to use the toolkit and the first control I'm working on is the cascading dropdown list. I'm messing with the web service right now. The example uses an xmldocument for the source of the data. My data is already being returned in the form of a list. Can I make that work or do I have to turn my data into an xmldocument? Hopefully not.

Thanks for the help

Hi,

Yes, you can make this work. All you really need to do is implement a web method that returns an array of CascadingDropDownNameValue objects. Check outhttp://ajax.asp.net/ajaxtoolkit/Walkthrough/CCDWithDB.aspx for an example. Just map your list of items to CascadingDRopDownNameValue objects and you should be good.

Thanks,
Ted

Warning: Unable to update auto-refresh reference microsoft.web.atlas.dll

We are 2 developers working on a web application and we started to use ASP.Net Ajax (Atlas). We added the the toolkit and asp.net ajax to the toolbox in visual studio 2005 and we added the 2 dlls to our bin directory in the project. Everytime we move the project from one machine to the other we recieve the following warnings

Warning: Unable to update auto-refresh reference 'microsoft.web.atlas.dll'. Can not find assembly 'D:\ZPrograms3\DotNetFrameworkEnhancements\AspNetAjax (Atlas)\AtlasControlToolkit\SampleWebSite\Bin\Microsoft.Web.Atlas.dll'.

Warning: Unable to update auto-refresh reference 'atlascontroltoolkit.dll'. Can not find assembly 'D:\ZPrograms3\DotNetFrameworkEnhancements\AspNetAjax (Atlas)\AtlasControlToolkit\SampleWebSite\Bin\AtlasControlToolkit.dll'.

Should we put the ASP.Net stuff in a folder on the C: drive in a ASP.Net folder on both machines. What I don;t understand is why we have to do that if we have the dlls in our bin folder in the project. Can anyone clarify?

Newbie

hello

i think this is nothing to worry about. the problem is that VS is trying to get a new dll when you compile and when you've moved the project to another machine, you've just lost that reference (probably you don't have the toolkit on the other machine or it's placed in a different folder). so this shouldn't take your sleep :D


But what is the solution?

Set a new reference?

Warnings at web server side

Hello,

Log of IIS 5.0 under Win 2000 Server contains the following warnings relating to PreRender of the AJAX ScriptManager:

"Exception information:
Exception type: InvalidOperationException
Exception message: Partial rendering requires a browser that supports W3C DOM Level 1.0.

Thread information:
Thread ID: 11
Thread account name: WEBSERVERA\ASPNET
Is impersonating: False
Stack trace: at Microsoft.Web.UI.ScriptManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
"

Do you have an idea what the users see in their browsers in this case? Or please give me a hint which browser I should use to test this (I think it should be a really old one)

Regards,

Di.

Hi Di,

You are right about the browser being old. For AJAX to work the browser should support XMLHttp Object.

On your pages you can run a client script which would check for this object and display a browser compatibility issue than waiting for the page to be sent to the server.

Check this link on how to check for the object in different browsers.

http://www.w3schools.com/dom/dom_http.asp

Happy programming,
Anton


Hi Anton,

Thanks for the info.

But I still want to find out what users see in their browser in the case of such warnings. How does it affect their work with the web site...

Regards,

D.


I like your enthusiasm. You can download Multiple IE fromhttp://tredosoft.com/

which has simulator from IE 3.0 onwards.

You can also download older version of Netscape fromhttp://browser.netscape.com/ns8/download/archive.jsp

but they dont have all versions but start from 4.7 onwards

Happy programming,

Anton


Thanks. Will check 'em.

Was this error a bugs on AJAX Control Toolkit or what?

Kindly explain if the error below was a bugs on AJAX Control Toolkit or cause by what.

Error:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. --> System.NotSupportedException: This page is missing a HtmlHead control which is required for the CSS stylesheet link that is being added. Please add . at AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control) in d:\E\AjaxControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ScriptObjectBuilder.cs:line 229 at AjaxControlToolkit.ScriptControlBase.OnPreRender(EventArgs e) in d:\E\AjaxControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ScriptControlBase.cs:line 270 at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -- End of inner exception stack trace -- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.file_utilities_usermaster_edituser_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Thank you in advance,

Zed

Simple answer looks like no.

From the error it seems you have added a CSS without a head tag..i.e. ina control. And to register that CSS directly as you intend to do...use

AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control)

Hope that helps..


Thank you for your immediate response. My assumptions is that you're correct however the only thing that keeps me on thinking is that I did not changed or modify anything on the page and even the CSS file. The page is working fine from the beginning and suddenly I just received this error. Its kind a weird you know.Smile

Thanks again,

Zed


Hi Zed,

If you want me to investigate, Ia m more then happy to do so, but for that you will have to put the code here , else if its just one occasion, try replicating it. Are you using CSS control adapter by any chance.

If the answer above helped do not forget to mark so.

Thanks

Watermark + Textbox Issue

I have a web form with a text box with an associated watermarktextbox extender and a button. The goal is to have the user input a name into the the textbox and then use that value when the button is clicked as parameter to a new web page. This works if i remove the watermarktextbox extender. Any assistance would be appreciated.


Do you want a watermark? What exactly do you want to do? Are you receiving errors?


Sorry for the vague original post. Yes, the goal is to have a watermarked textbox. The user enters data into the textbox and I want to use that data as a parameter to a redirection to a new webpage. The problem is that when I use the watermarked textbox the textbox text is not captured (i.e., my parameter is empty). If I use a standard textbox, I'm able to retrieve the textbox text and use it as I intend. I receive no errors I just get an empty value. I'm guessing I need to change the way I get the value of the textbox (client-side script?) but I have no idea how to do this.

Thanks.


OK. Post the script that your using.


Hi,

It's hard to tell without knowing how do you pass value? Are you using queryString? Or PostBackURL?

Please be more specific, a simple repro is preferred.

WCF and ASP.NET 3.5 RTM integration on different sites - 404 errors

Hello,

Setup 1:

Project with WCF service in it .svc file has Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory", web.config does not include <system.ServiceModel> junk. We've got your standard config-free json service that has been hyped. VS 2008 web dev server url (simplicity sake here):http://localhost:1/service.svc

Seperate Project with ASP.NET application in it. ScriptManager has a service reference to the above svc file at (http://localhost:1/service.svc). Javascript on the page invokes a method in the service. VS 2008 web dev server url (simplicity again):http://localhost:2/webform.aspx

Runtime 1:

    JS "proxy class" is successfully downloaded from the service (http://localhost:1/service.svc/jsdebug)

    JS Object contructed from the proxy class.

    Error on invocation of service method - 404 not found!

    Fiddler says proxy class is invoking the service athttp://localhost:2/service.svc/myServiceMethod. Please note the port there, it should behttp://localhost:1 not 2! 2 is the site where the webform is being hosted at.

Config 2:

Move the WCF project onto local IIS 7.0 (Vista).

Update script reference to the service tohttp://[machinename]/serviceVD/service.svc

Runtime 2:

    JS "proxy class" is successfully downloaded from the service (http://[machinename]/serviceVD/service.svc/jsdebug)

    JS Object contructed from the proxy class.

    Error on invocation of service method - 404 not found!

    Upon inspection the proxy class is invoking the service athttp://localhost:2/serviceVD/service.svc/myServiceMethod. Please note the port there, it should behttp://[machinename]/serviceVD nothttp://localhost:2! Again the root of the url is being pulled from where the webform is being hosted.

All the references I've seen and have gotten to work include the WCF service in the same project as the webform that is calling them. How do I call remote service on another site or machine?

Not sure if it will help but it hass some good info of Asp.net Ajax with WCF by Dino Esposite
http://dotnetslackers.com/articles/ajax/JSON-EnabledWCFServicesInASPNET35.aspx

WCF ASP.NET Service not working - what am I missing

Hello. This is a simple question, so please take a look.

I am using Orcas Beta2 and I created a new Solution. In there added a Web Application Project. In the project I created an Ajax enabled WCF service. When I call the service from JavaScript I get this error: Service1 is not defined. What am I missing? Here is the very simple code. Thanks!

default.aspx:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %
<!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>
<script type="text/javascript">
function Hello() {
WebApplication1.Service1.HelloWorld(onComplete, onTimeout);
}
function onComplete(result) {
alert(result);
}
function onTimeout(result) {
alert("Timed out!");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<input type="button" value="Call Hello" onclick="Hello()" />
</div>
</form>
</body>
</html>

namespace WebApplication1
{
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1
{
// Add [WebGet] attribute to use HTTP GET
[OperationContract]
public string HelloWorld()
{
return "helooo";
}
}
}

code for the service:

namespace WebApplication1
{
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1
{
// Add [WebGet] attribute to use HTTP GET
[OperationContract]
public string HelloWorld()
{
return "helooo";
}
}
}

web.config (this is generated by VS2008 and i did not modify it):

<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/warnaserror-" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="WebApplication1.Service1AspNetAjaxBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<service name="WebApplication1.Service1">
<endpoint address="" behaviorConfiguration="WebApplication1.Service1AspNetAjaxBehavior" binding="webHttpBinding" contract="WebApplication1.Service1"/>
</service>
</services>
</system.serviceModel>
</configuration>

Thanks!

Checkout the following post:
http://odetocode.com/Blogs/scott/archive/2007/07/30/11171.aspx


Yep, I'm guessing this is what you're missing. Afraid you can't get away with just .html as the client. You'll have to create an .aspx page.

Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory" %>


Thanks Kazi,

I tried this and ran into other problems. See http://forums.asp.net/p/1170276/1956960.aspx#1956960

I thought that the default out of the box experience should be easy. It seems that it is not and one needs to fully understand te WCF model before getting anything to work. And WCF is a big monster to learn just to expose a simple REST service.


Jonathan,

Sorry for cutting and pasting only part of the aspx file. i updated the post and included all of the aspx file. Yes, i am using an aspx file and not an html file. Otherwise it would not compile. I tried adding the Factory to the svc file but it did not work for other reasons. It would be nice if someone, (hello Microsoft! :)) would post steps to create a simple service and how to consume it via an aspx page. This was dead simple in asmx, but wcf has just too many knobs and it seems that detailed knowledge of wcf is required to get this to work.


Thanks!

Wednesday, March 21, 2012

Web App Projects and ScriptManager/UpdatePanel

I am VERY new to this so please excuse me for this obvious question. I have started a basic web app project in VS2005. Just a button, label and textbox. Wors fine. If I drop a scriptmanager and update panel on the page and move the three controls to the update panel I get a scripting error that 'Sys' is not defined. The error is in the page source script shown below:

Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tUpdatePanel1'], [], [], 90);

Is there a way to prevent this or edit the script that the script manager produces so as to not throw the error?

Thanks

Hi ixis,

You will have to use the "ASP.NET-Enabled Web Site" template instead of the "Empty Web Site" when creating a new Ajax application so that http handlers and modules are registered in your web.config. Here's an example of an Ajax-Enabled Web Site's web.config:


<configuration> <configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" /> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" /> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" /> </sectionGroup> </sectionGroup> </sectionGroup> </configSections> <system.web> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </controls> <tagMapping> <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="System.Web.UI.Compatibility.CustomValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="System.Web.UI.Compatibility.RangeValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="System.Web.UI.Compatibility.RegularExpressionValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="System.Web.UI.Compatibility.RequiredFieldValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="System.Web.UI.Compatibility.ValidationSummary, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </tagMapping> </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. --> <compilation debug="false"> <assemblies> <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </assemblies> </compilation> <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> <httpModules> <add name="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> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </modules> <handlers> <remove name="WebServiceHandlerFactory-ISAPI-2.0"/> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </handlers> </system.webServer></configuration>

Thanks, I'll give that a try. Just to note because I wasn't very clear in my original post, if I create a normal ASP.NET Website project, the UpdatePanel works just fine. If I create a Web Application Project using the Visual Studio 2005 Web Application Project Model I have the problem. I'm not saying your solution isn't what I am looking for just clearing up the original question. I am certainly going to review my web.config as per your post.