Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Wednesday, March 28, 2012

Update to Beta 2.0 and can not run on Server

I have recently upgraded my Web Page to use the new AJAX 2.0 beta. I have also included the November CTP. This works fine on my local PC, but when I run it on my Server, it blows up.

I had initially included all of my DLL's in the Bin folder. After reading many of the posts, I decided to install the ASPAJAXExtSetup.msi and ASPAJAXCTP.msi onto my server. No joy.

I get the following error message:

Server Errorin'/EDCC_Test' Application.------------------------Index was outside the bounds of the array. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack tracefor more information about the error and where it originatedin the code. Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identifiedusing the exception stack trace below. Stack Trace: [IndexOutOfRangeException: Index was outside the bounds of the array.] EDCC.PageBase.curUser() +687 File_Home.Page_Load(Object sender, EventArgs e) +92 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 ------------------------Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

I am not sure where to start debugging this code. As I stated above, it works fine on my machine, but not from the server.

Can someone help point me in the correct direction? Is there a way to "Debug" the page from the server side like from within Visual Studio? Maybe allowing me to "step" through the code? Is there a way to show a more verbose error message that will point me in a better direction?

Thanks,

Bryan

PS: Before I upgraded my site to the Beta 2.0, it was running fine. (Thank goodness I had the foresite to try to install it onto a "test" site before making it live.) Big Smile

hello.

well, it looks like you're passing an index too big for an array.

to see how to get more info about the error on an asp.net, take a look at the <customerrors> element.


Hello,

I agree with Luis. I mean i'm not completely sure that by upgrading you broke something. You probably have a dropdownlist or maybe an array that isn't getting data put into it. What does your code look like? What does the data access layer look like?

Not sure of any way to actually do debugging on the server like you can in the VS2005 IDE, unless you can recreate the environment on your local machine (Database, Web Application etc.)

VS2005 Team System Developer includes the ability to do unit tests. This allows for you to actually step through your code and make sure that all of the pieces are logical and you don't have issues that would show up until you actually loaded up the website onto the server and tested.

Good luck and happy thanksgiving.

JoeWeb


Thanks all for your replies.

I figured out my problem by republishing a million times with different "Response.Write" and "Response.End" statements until I found the error.

I am developing an Intranet site, and I rely on the Windows user name to authenticate. When I created a "test" web site on my server, I had the "Allow Anonymous Logins" box checked somewhere in the properties. Once I removed this, it worked flawlessly. Jeesh, newbie mistake.

Bryan

Update Trigger and GridView problem

Hi!

I have an Accordion on my page. In one AccordionPane, i have an UpdatePanel containing a GridView and a button under. When i try to access my gridview in the code-behind, i encounter a problem. The trigger of my button doesn't work, the method associated with my button isn't called. If i click a second time and the button, it postback my page and i lose all the data and the page. if i click a third time, the trigger associated with the button finally works.

I only get this problem when i try to access my GridView in my page.

I add my code and underlined the line which causes the problem, i remove it everythin works fine

aspx file:

<asp:UpdatePanelID="UpdatePanelGridStartSecurities"runat="server"UpdateMode="Conditional"ChildrenAsTriggers="false">

<ContentTemplate>

<divclass="ContentPaneDetails">

<%-- GridView : Supports de depart--%>

<divclass="ContentPaneElement">

<asp:GridViewID="GridViewGainOption_StartSecurities"runat="server"AutoGenerateColumns="false"BackColor="White"

BorderStyle="None">

<Columns>

<%-- Inclure --%>

<asp:TemplateField>

<HeaderTemplate>

<labelid="LbGainOption_Include">

Include

</label>

</HeaderTemplate>

<HeaderStyleBackColor="#D5DAE0"BorderStyle="None"/>

<ItemTemplate>

<asp:RadioButtonID="GainOption_Include"runat="server"BackColor="ActiveCaptionText"GroupName="IncludeExclude"

Checked='<%# ((bool)DataBinder.Eval(Container.DataItem, "IsExcluded"))?false:true %>'/>

</ItemTemplate>

<ItemStyleBorderColor="Black"BorderWidth="1px"HorizontalAlign="Center"/>

</asp:TemplateField>

<%-- Exclure --%>

<asp:TemplateField>

<HeaderTemplate>

<labelid="LbGainOption_Exclude">

Exclude

</label>

</HeaderTemplate>

<HeaderStyleBackColor="#D5DAE0"BorderStyle="None"/>

<ItemTemplate>

<asp:RadioButtonID="GainOption_Exclude"runat="server"BackColor="ActiveCaptionText"GroupName="IncludeExclude"

Checked='<%# DataBinder.Eval(Container.DataItem, "IsExcluded") %>'/>

</ItemTemplate>

<ItemStyleBorderColor="Black"BorderWidth="1px"HorizontalAlign="Center"/>

</asp:TemplateField>

<%-- Valeur mobilière --%>

<asp:TemplateField>

<HeaderTemplate>

<labelid="LbGainOption_SecurityName">

Valeur mobilière

</label>

</HeaderTemplate>

<HeaderStyleBackColor="#D5DAE0"BorderStyle="None"/>

<ItemTemplate>

<asp:TextBoxID="GainOption_SecurityName"runat="server"BorderStyle="None"Text='<%# GetSecurityName(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "SecurityId"))) %>'></asp:TextBox>

</ItemTemplate>

<ItemStyleBorderColor="Black"BorderWidth="1px"/>

</asp:TemplateField>

<%-- Isin Code --%>

<asp:TemplateField>

<HeaderTemplate>

<labelid="GainOption_IsinCode">

Isin

</label>

</HeaderTemplate>

<HeaderStyleBackColor="#D5DAE0"BorderStyle="None"/>

<ItemTemplate>

<asp:TextBoxID="GainOption_IsinCode"runat="server"BorderStyle="None"Text='<%# GetIsinCode(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "SecurityId"))) %>'></asp:TextBox>

</ItemTemplate>

<ItemStyleBorderColor="Black"BorderWidth="1px"/>

</asp:TemplateField>

<%-- Seuil --%>

<asp:TemplateField>

<HeaderTemplate>

<labelid="LbGainOption_Threshold">

Seuil %

</label>

</HeaderTemplate>

<HeaderStyleBackColor="#D5DAE0"BorderStyle="None"/>

<ItemTemplate>

<asp:TextBoxID="GainOption_Threshold"runat="server"BorderStyle="None"Text='<%# DataBinder.Eval(Container.DataItem, "TriggerringThreshold") %>'></asp:TextBox>

</ItemTemplate>

<ItemStyleBorderColor="Black"BorderWidth="1px"/>

</asp:TemplateField>

<%-- Supprimer --%>

<asp:TemplateField>

<HeaderTemplate>

</HeaderTemplate>

<HeaderStyleBackColor="#D5DAE0"BorderStyle="None"/>

<ItemTemplate>

<asp:LinkButtonID="GainOption_Delete"runat="server"CommandName="Delete">Supprimer</asp:LinkButton>

</ItemTemplate>

<ItemStyleBackColor="#D5DAE0"BorderStyle="None"/>

</asp:TemplateField>

</Columns>

</asp:GridView>

</div>

</div>

<divclass="ContentPaneDetails">

<divclass="ContentPaneElement">

<%-- Ajouter un nouveau support de départ --%>

<asp:LinkButtonID="GainOption_AddStartSecurity"runat="server"Text="Ajouter une valeur"OnClick="GainOption_AddStartSecurity_Click">

</asp:LinkButton>

<br/>

<%-- Nom du support --%>

<asp:LabelID="LbGainOption_StartSecurityName"runat="server"Visible="false"Text="Valeur moblière :"></asp:Label>

<asp:TextBoxID="GainOption_StartSecurityName"runat="server"Visible="false"></asp:TextBox>

<asp:ImageButtonID="ImgGainOption_StartSecurityName"runat="server"ImageUrl="~/Images/Directory.gif"Visible="false"/>

<ajaxToolkit:AutoCompleteExtenderID="AutoCompleteGainOption_StartSecurityName"runat="server"TargetControlID="GainOption_StartSecurityName"

ServicePath="WebServices/AutoComplete.asmx"ServiceMethod="GetSecuritiesListByLongName"CompletionSetCount="3"MinimumPrefixLength="3"

CompletionListCssClass="autocomplete_completionListElement"CompletionListItemCssClass="autocomplete_listItem"

CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"UseKeyValuePairs="true"

KeyHiddenFieldID="HiddenModify_SecurityId">

</ajaxToolkit:AutoCompleteExtender>

<%-- Isin du support --%>

<asp:LabelID="LbGainOption_StartIsinCode"runat="server"Visible="false"Text="Isin : "></asp:Label>

<asp:TextBoxID="GainOption_StartIsinCode"runat="server"Visible="false"></asp:TextBox>

<asp:ImageButtonID="ImgGainOption_StartIsinCode"runat="server"ImageUrl="~/Images/Directory.gif"Visible="false"/>

<ajaxToolkit:AutoCompleteExtenderID="AutoCompleteGainOption_StartIsinCode"runat="server"TargetControlID="GainOption_StartIsinCode"

ServicePath="WebServices/AutoComplete.asmx"ServiceMethod="GetSecuritiesListByIsinCode"CompletionSetCount="3"MinimumPrefixLength="3"

CompletionListCssClass="autocomplete_completionListElement"CompletionListItemCssClass="autocomplete_listItem"

CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"UseKeyValuePairs="true"

KeyHiddenFieldID="HiddenModify_SecurityId">

</ajaxToolkit:AutoCompleteExtender>

<%-- Seuil du support --%>

<asp:LabelID="LbGainOption_StartThreshold"runat="server"Visible="false"Text="Seuil : "></asp:Label>

<asp:TextBoxID="GainOption_StartThreshold"runat="server"Visible="false"></asp:TextBox>

<%-- Insert --%>

<asp:LinkButtonID="InsertGainOption_StartSecurity"runat="server"Visible="false"Text="Insert"OnClick="InsertFromSecurity_Click"></asp:LinkButton>

</div>

<divclass="Clear">

</div>

</div>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlID="GainOption_AddStartSecurity"EventName="Click"/>

<asp:AsyncPostBackTriggerControlID="InsertGainOption_StartSecurity"EventName="Click"/>

</Triggers>

</asp:UpdatePanel>

cs file:

protectedvoid Page_Load(object sender,EventArgs e)

{

if (IsPostBack ==false)

{

HiddenModify_NavigationMode.Value ="1";

//HiddenModify_NavigationMode.Value = "2";

//HiddenModify_MonitoringMandateId.Value = "7";

LogicMonitoringMandates monitorings =LogicMonitoringMandates.getInstance();

LogicGainMandateOptions gainOptions =LogicGainMandateOptions.getInstance();

LogicLossMandateOptions lossOptions =LogicLossMandateOptions.getInstance();

LogicSellMandateOptionDetails sellDetails =LogicSellMandateOptionDetails.getInstance();

LogicBuyMandateOptionDetails buyDetails =LogicBuyMandateOptionDetails.getInstance();

LogicPortfolios portfolios =LogicPortfolios.getInstance();

LogicSecurities securities =LogicSecurities.getInstance();

LogicPortfolioPositions positions =LogicPortfolioPositions.getInstance();

LogicPortfolioPositionDetails details =LogicPortfolioPositionDetails.getInstance();

securities.GetSecurities();

if (HiddenModify_NavigationMode.Value =="1")

{

/*

RadioButton gainOption_AutomaticPerimeter = (RadioButton)AccordionPaneGainOption.FindControl("GainOption_AutomaticPerimeter");

RadioButton gainOption_00007Threshold = (RadioButton)AccordionPaneGainOption.FindControl("GainOption_00007Threshold");

gainOption_AutomaticPerimeter.Checked = true;

gainOption_00007Threshold.Checked = true;

*/

}

if (HiddenModify_NavigationMode.Value =="2")

{

int l_intMonitoringMandateId =Convert.ToInt32(HiddenModify_MonitoringMandateId.Value);

monitorings.GetMonitoringMandateByMonitoringMandateId(l_intMonitoringMandateId);

gainOptions.GetMandateOptionsByMonitoringMandateId(l_intMonitoringMandateId);

HiddenModify_GainMandateOptionId.Value =Convert.ToString(gainOptions.GetMandateOptionFromIndex(0).MandateOptionId);

GridView gridViewGainOption_StartSecurities = (GridView)AccordionPaneGainOption.FindControl("GridViewGainOption_StartSecurities");

The problem comes if I add the line above

//sellDetails.GetMandateOptionDetailsByMandateOptionId(Convert.ToInt32(HiddenModify_GainMandateOptionId.Value));

//gridViewGainOption_StartSecurities.DataSource = sellDetails.TABLE;

//gridViewGainOption_StartSecurities.DataBind();

AccordionPaneSignaletique_DataBind();

AccordionPaneGainOption_DataBind();

}

}

}

Does anyone know what i can do? Can i add the trigger of the updatePanel in the code behind in the pageload method ?

Thanks in advance,

I've been looking for this problem for all my weekend and i found what was the problem!!!!!!!

The problem comes from the Accordion component, during the Page_Load, the Accordion and the child component doesn't exists, but in my case i didn't get any error of "not found controls".

I found a fix on this page :

http://couldbedone.blogspot.com/2007/07/what-wrong-with-accordion-control.html

Thanks a lot to this guy!

i just added Accordion.FindControl("nothing") on a Page_Init and it works great now!

Updated Atlas info?

Wish Atlas guys had included the timestamp on this web page, so that one would know when it was updated last.

http://atlas.asp.net/docs/default.htm

Rightnow, I'm looking for the most uptodate (Dec 05) documentation & Hands-on labs for Atlas and I'm not sure if the above link is the right one.

-Rach

The Last-Modified HTTP Header indicates:

Mon, 19 Dec 2005 16:05:28 GMT

Plus the example for the AutoComplete stuff uses the new AutoCompleteExtender (http://www.nikhilk.net/Entry.aspx?id=100) stuff. So yes, it has been updated for this new build.

Updatemode=Conditional still updatepanel is refreshing

Dear all...

I have two update pannel in my page. And both have some controlls and its update progress controll. I have given the updatemode property to conditional for both update pannels. Al also i have assigned the triggers properly. The problem i am facing now is..

We can refer as follows

First update pannel as - [A] and Seccond update pannel as - [B]

I want to update the [B] when i am clicking on a button which resides in [A] , But when i am clicking on the button its refreshing both. And also its showing both updateprogress ..

Thank you very much

hi,

I think both progress bar will be showing because you might not assign associateupdatepanelid in updateprogress.

If u assign this could it will possible for you share your code.


hello.

well, take a look at the childrenastriggers property of the updatepanel control. if you set it to false, your button won't refresh that panel. the problem is that if you have other controls that need to refresh their "parent" panel, then you'll need to register those controls as async postback controls (scriptmanager.registerasyncpostbakcontrol) and refresh the panel during a partial postback started by one of those controls (by calling the update method).


I have asisgned associateupdatepanelid in both updateprogress and also I marked childrenastriggers = false. Still its happening.

hello again.

can you build a really simple page that reproduces this problem and post it here?


I have made almost a same sample... In this sample app also i am facing the same problem...

-----The HTML Part

=================================================================================

<body>

<formid="form1"runat="server">

<asp:ScriptManagerID="ScriptManager1"runat="server"/>

<divstyle="width: 359px; height: 274px">

<asp:UpdatePanelID="UpdatePanel1"runat="server"ChildrenAsTriggers="False"UpdateMode="Conditional">

<ContentTemplate>

<divstyle="width: 315px; height: 185px; background-color: inactivecaptiontext">

<br/>

<asp:ButtonID="butRefresh1"runat="server"Height="36px"Text="To Refresh the update panel 1"Width="203px"OnClick="butRefresh1_Click"/>

<br/>

<br/>

<asp:TextBoxID="text1"runat="server"></asp:TextBox><br/>

<br/>

<asp:ButtonID="Button2"runat="server"Height="31px"Text="To refresh the update panel 2"

Width="200px"OnClick="Button2_Click"/> <br/>

</div>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlID="butRefresh1"EventName="Click"/>

</Triggers>

</asp:UpdatePanel>

<asp:UpdateProgressID="UpdateProgress1"runat="server"AssociatedUpdatePanelID="UpdatePanel1"DisplayAfter="10">

<ProgressTemplate>

Loading ....

</ProgressTemplate>

</asp:UpdateProgress>

</div><br/><br/><div>

<divstyle="width: 582px; height: 229px">

<asp:UpdatePanelID="UpdatePanel2"runat="server"ChildrenAsTriggers="False"UpdateMode="Conditional">

<ContentTemplate>

<divstyle="width: 521px; height: 115px; background-color: lightgoldenrodyellow">

<br/>

<asp:TextBoxID="text2"runat="server"Height="23px"Width="313px"></asp:TextBox>

<br/>

<br/>

<asp:UpdateProgressID="UpdateProgress2"runat="server"DisplayAfter="10">

<ProgressTemplate>

<divstyle="width: 368px; height: 100px; background-color: #ffccff">

<asp:LabelID="Label1"runat="server"Font-Bold="True"Font-Italic="False"Font-Size="X-Large"

Font-Underline="True"Height="75px"Text="Loading ...."Width="325px"></asp:Label></div>

</ProgressTemplate>

</asp:UpdateProgress>

</div>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlID="Button2"EventName="Click"/>

</Triggers>

</asp:UpdatePanel></div></div></form></body>

=================================================================================

VB.NET Source code...

=================================================================================

ProtectedSub butRefresh1_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)

Dim iAs Int32

For i = 1To 10000000

text1.Text ="Pannel1 refreshed ..."

Next

EndSub

ProtectedSub Button2_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)

Dim iAs Int32

For i = 1To 10000000

text2.Text ="Pannel2 refreshed ..."

Next

EndSub

=================================================================================

I hope youi will try your level best for me to getrid of from this problem...

Thank you


hello.

well, you're getting refresh because you've also set up the buttons as triggers. this will force a postback. I'm putting here a very simple example of how you can refresh the panel through code:

<%@. Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
void c(object sender, EventArgs e)
{
panel.Update();
}

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:scriptmanager runat="server" id="manager" />
<asp:Updatepanel runat="server" id="panel" UpdateMode="conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<asp:Button runat="server" ID="bt" Text="refresh" OnClick="c" /><br />
<asp:Button runat="server" ID="Button1" Text="don't refresh" /><br />
<%=DateTime.Now.ToString() %>
</ContentTemplate>
</asp:Updatepanel>

<%=DateTime.Now.ToString() %>
</form>
</body>
</html>

UpdateMode = Conditional still refreshes!

I have a web application project running Atlas, now Ajax, with a masterpage where I have a scriptmanager.On the default page I have a scriptmanagerproxy and some usercontrols. these have updatepanels inside of them, all with updatemode=conditional and triggers for ONE button to make them refresh.

No matter which button I press, the updatepanel refreshes. It doesn't really flicker, the problem is that it refreshes the content. I've tried removing everything, I've even tried with a new website project, and with and without masterpages, no matter the result is the same.

Can someone please explain this to me? I use the web_ctp.config and run on win 2003 server. please let me know what code you require, though the very basics aren't even working, I don't see the point of posting any now.

Solution found here...

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

UpdatePanel

Hi,

I have 3 update panels on my page. 1 is used for a submit button, 1 is for the rating control and the other is a message. Now if I click a button (which is under an updatepanel), it reloads the tool as well, which I realize is correct! :) I was wondering is it possible, I can control which update panel to fire off in a certain scenario? e.g clicking on the rating tool shouldn't reload the message or vice versa.

I would appreciate all help.

Thanks!

Set UpdateMode of the panel to Conditional, and then add triggers. The panel will only update when the events you specify occur. You may also need to set ChildrenAsTriggers=False.

updatepanel - entire page posts back

I have a datagrid in an updatepanel. Clicking on anyrow in the datagrid changes the style to bold so the user knows they have selected it. On my development machine, clicking on the row updates only the panel as you would expect. Once on live server, clicking on a row in the datagrid posts back the entire page. Does anybody have any ideas as to what I can do to fix this.

<asp:UpdatePanelID="updatePanel" runat="server">

<ContentTemplate>

<asp:GridViewID="reconGrid"runat="server"CssClass="gridTable"AutoGenerateColumns="false" AllowPaging="true"

PagerSettings-Mode="NumericFirstLast"PagerStyle-HorizontalAlign="right"PageSize="15"OnPageIndexChanging="reconGrid_PageIndexChanging"

OnRowDataBound="reconGrid_RowDataBound"CellPadding="2"Width="450px"OnRowCommand="reconGrid_RowCommand">

<AlternatingRowStyleCssClass="gridAltItemTr"/>

<RowStyleCssClass="gridItemTr"/>

<HeaderStyleCssClass="gridHeaderTr"ForeColor="white"/>

<Columns>

<asp:ButtonFieldText="SingleClick"CommandName="SingleClick"Visible="false"ButtonType="link"/>

<asp:TemplateFieldHeaderText="Clr">

<ItemTemplate>

<asp:CheckBoxID="cleared"runat="server"Enabled="false"Checked='<%# Convert.ToBoolean(Eval("CheckCleared")) %>'/>

</ItemTemplate></asp:TemplateField>

<asp:TemplateFieldHeaderText="Date">

<ItemTemplate>

<asp:LabelID="dateLbl"runat="server"CssClass="ssLabel"Text='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'></asp:Label>

</ItemTemplate></asp:TemplateField>

<asp:TemplateFieldHeaderText="Chk #">

<ItemTemplate>

<asp:LabelID="chkLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("CheckNumber") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Payee">

<ItemTemplate>

<asp:LabelID="payeeLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("VendorName") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Amount">

<ItemTemplate>

<asp:LabelID="amountLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("Amount") %>'></asp:Label>

</ItemTemplate>

<ItemStyleHorizontalAlign="right"/>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="Type">

<ItemTemplate>

<asp:LabelID="typeLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("Type") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="FundTransactionsId"Visible="false">

<ItemTemplate>

<asp:LabelID="FundTransactionsId"runat="server"CssClass="ssLabel"Text='<%# Eval("Id") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="AccountTransactionsId"Visible="false">

<ItemTemplate>

<asp:LabelID="AccountTransactionsId"runat="server"CssClass="ssLabel"Text='<%# Eval("AccountTransactionsId") %>'></asp:Label>

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

</ContentTemplate>

</asp:UpdatePanel>

See this related post:http://forums.asp.net/p/1069974/1558261.aspx

-Damien


I did look at that post and it didn't help. All the other ajax on my site seems to work like they should.


You have aScriptManger control on your page, right?

-Damien


Yes I do have a script manager. All you have to do on the server is install the ajax framework right? That's all I did on the server. All my other ajax works fine.


For a server install, all you should need is the AJAX Framework, yes. For Visual Studio 2005, you need Visula Studio SP1.

-Damien


Here are the entire contents of my aspx page. Different parts are made hidden or visible as you go from top to bottom. I have 2 update panels on the page. When you click on any row in the datagrid, the amounts in the other updatepanel are updated. So they both post back at the same time, just that on server, the entire page posts back.

<%@.PageLanguage="C#"AutoEventWireup="true"EnableEventValidation="false"CodeBehind="AccountDetail.aspx.cs"Inherits="SchoolFunds.AccountDetail" %>

<%@.RegisterAssembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI"TagPrefix="asp" %>

<%@.RegisterAssembly="AjaxControlToolkit, Version=1.0.10618.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"

Namespace="AjaxControlToolkit"TagPrefix="ajax" %>

<%@.RegisterTagPrefix="uc1"TagName="Header"Src="../Share/controls/Header.ascx" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Account Details</title>

<scriptlanguage="javascript"src="../Share/css/util.js"></script>

<linkhref="../Share/css/global.css"type="text/css"rel="STYLESHEET">

<linkhref="../spreadsheet.css"rel="stylesheet"type="text/css"/>

</head>

<bodyclass="body"style="width: 100%">

<formmethod="post"runat="server">

<asp:ScriptManagerID="scriptmanger1"runat="server"></asp:ScriptManager>

<divclass="headerDiv"id="headers"><uc1:Headerid="ucHeader"runat="server"></uc1:header></div>

<ajax:AlwaysVisibleControlExtenderrunat="server"id="AlwaysVisibleControlExtender1"TargetControlID="allwaysOnMessage"VerticalOffset="117"HorizontalOffset="0"ScrollEffectDuration=".1"></ajax:AlwaysVisibleControlExtender>

<asp:PanelID="allwaysOnMessage"runat="server"BackImageUrl="~/bar1.gif"Width="755px"BorderWidth="1px"BorderStyle="Solid"BorderColor="buttonshadow">

<tablealign="left"style="vertical-align: middle; text-align: center; font-weight: bold;">

<tr>

<tdclass="dateLabel">Date</td>

<tdclass="typeLabel">Type</td>

<tdclass="numberLabel">Number</td>

<tdclass="dropdownLabel">Payee</td>

<tdclass="dropdownLabel">Account</td>

<tdclass="memoLabel">Memo</td>

<tdclass="ssMoneyTextBox">Increase</td>

<tdalign="right"style="width: 38px;">

<asp:Imagerunat="server"ID="aasdf"ImageUrl="~/images/check.gif"/>

</td>

<tdclass="ssMoneyTextBox">Decrease</td>

</tr>

</table>

</asp:Panel>

<br>

<asp:ValidationSummaryID="valSummary3"runat="server"ValidationGroup="valEdit"/>

<br>

<asp:ValidationSummaryid="valSummary"runat="server"ValidationGroup="validAdd"/>

<br>

<asp:ValidationSummaryid="valSummary1"runat="server"ValidationGroup="validEdit"/>

<br>

<asp:ValidationSummaryid="valSummary2"runat="server"ValidationGroup="validAddEmpty"/>

<asp:GridViewID="GridView1"runat="server"BorderColor="#DEDFDE"Width="750px"ShowHeader="true"HeaderStyle-BackColor="#FAFFF9"

BorderStyle="solid"BorderWidth="1px"AllowPaging="true"PageSize="15"CellPadding="4"ForeColor="Black"GridLines="Vertical"ShowFooter="false"

OnRowDataBound="GridView1_RowDataBound"OnPageIndexChanging="GridView1_PageIndexChanging"OnRowCommand="GridView1_RowCommand"AutoGenerateColumns="False"OnRowUpdating="GridView1_RowUpdating">

<RowStyleCssClass="row1"/>

<PagerStyleHorizontalAlign="right"BackColor="#E0F5E1"BorderStyle="solid"BorderWidth="1px"BorderColor="black"/>

<AlternatingRowStyleCssClass="row2"/>

<Columns>

<asp:ButtonFieldText="SingleClick"CommandName="SingleClick"Visible="false"FooterText="SingleClick"ButtonType="Link"CausesValidation="true"ValidationGroup="validEdit"/>

<asp:TemplateFieldVisible="false">

<HeaderTemplate>

</HeaderTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="AccountTransactionsId"HeaderStyle-CssClass="ssHeader"Visible="false">

<ItemTemplate>

<asp:LabelID="AccountTransactionsIdLabel"runat="server"Text='<%# Eval("AccountTransactionsId") %>'CssClass="ssLabel"></asp:Label>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="FundTransactionsId"HeaderStyle-CssClass="ssHeader"Visible="false">

<ItemTemplate>

<asp:LabelID="FundTransactionsIdLabel"runat="server"Text='<%# Eval("FundTransactionsId") %>'CssClass="ssLabel"></asp:Label>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="TransferAccountId"HeaderStyle-CssClass="ssHeader"Visible="false">

<ItemTemplate>

<asp:LabelID="TransferAccountIdLabel"runat="server"Text='<%# Eval("TransferAccountId") %>'></asp:Label>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"HorizontalAlign="left"VerticalAlign="bottom"/>

<HeaderTemplate>

<asp:TextBoxID="DateAdd"runat="server"CssClass="ssDateTextBoxAdd"Visible="true"Width="70px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="DateAddWME"runat="server"TargetControlID="DateAdd"WatermarkText="Date"WatermarkCssClass="dateTextBoxWM"></ajax:TextBoxWatermarkExtender>

<asp:ImageButtonrunat="server"ID="dateAddImgBtn"CausesValidation="false"TabIndex="-1"ImageUrl="~/images/calendar button.bmp"Visible="true"/>

<asp:RequiredFieldValidatorID="reqDateAdd"runat="server"ErrorMessage="You must enter a transaction date."ControlToValidate="DateAdd"Display="static"ValidationGroup="validAdd">**</asp:RequiredFieldValidator>

<asp:rangevalidatorid="valDateAdd"runat="server"ErrorMessage="Transaction date is out of range or is incorrect format (mm/dd/yyyy)."

ControlToValidate="DateAdd"MaximumValue="12/31/9999"MinimumValue="1/1/1753"Type="Date"Display="Dynamic"ValidationGroup="validAdd">**</asp:rangevalidator>

<ajax:CalendarExtenderID="AddCalendar"runat="server"TargetControlID="DateAdd"Animated="true"PopupButtonID="dateAddImgBtn"></ajax:CalendarExtender>

</HeaderTemplate>

<ItemStyleCssClass="ssCell"VerticalAlign="bottom"/>

<ItemTemplate>

<asp:LabelID="DateLabel"runat="server"Text='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'ToolTip='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'CssClass="dateLabel"Width="70px"></asp:Label>

<asp:TextBoxID="DateText"TabIndex="1"runat="server"Text='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'ToolTip='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'Visible="false"CssClass="ssDateTextBox"Width="70px"></asp:TextBox>

<ajax:CalendarExtenderID="EditCalendar"runat="server"TargetControlID="DateText"Animated="true"PopupButtonID="dateEditImgBtn"></ajax:CalendarExtender>

<asp:RequiredFieldValidatorID="reqDate"runat="server"ErrorMessage="You must enter a transaction date."ControlToValidate="DateText"Display="dynamic"ValidationGroup="validEdit">**</asp:RequiredFieldValidator>

<asp:rangevalidatorid="valDate"runat="server"ErrorMessage="Transaction date is out of range or is incorrect format (mm/dd/yyyy)."

ControlToValidate="DateText"MaximumValue="12/31/9999"MinimumValue="1/1/1753"Type="Date"Display="Dynamic"ValidationGroup="validEdit">**</asp:rangevalidator>

<asp:ImageButtonrunat="server"ID="dateEditImgBtn"CausesValidation="false"TabIndex="-1"ImageUrl="~/images/calendar button.bmp"Visible="false"/>

</ItemTemplate>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"/>

<HeaderTemplate>

<asp:TextBoxID="typeAdd"CssClass="ssTypeTextBox"TabIndex="-1"runat="server"Width="33px"Enabled="false"></asp:TextBox>

</HeaderTemplate>

<ItemTemplate>

<asp:LabelID="TypeLabel"tabindex="-1"runat="server"Text='<%# Eval("TransactionType") %>'ToolTip='<%# Eval("TransactionType") %>'CssClass="typeLabel"Width="33px"></asp:Label>

<asp:TextBoxID="TypeText"TabIndex="-1"runat="server"Text='<%# Eval("TransactionType") %>'ToolTip='<%# Eval("TransactionType") %>'visible="false"CssClass="ssTypeTextBox"ReadOnly="true"></asp:TextBox>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"/>

<HeaderTemplate>

<asp:TextBoxID="CheckNumberAdd"runat="server"CssClass="ssNumberTextBoxAdd"Visible="true"Width="50px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="CheckNumberAddWME"runat="server"TargetControlID="CheckNumberAdd"WatermarkText="Number"WatermarkCssClass="numberTextBoxWM"></ajax:TextBoxWatermarkExtender>

</HeaderTemplate>

<ItemTemplate>

<asp:LabelID="CheckNumberLabel"runat="server"Text='<%# Eval("CheckNumber") %>'ToolTip='<%# Eval("CheckNumber") %>'CssClass="ssNumberTextBox"Width="50px"></asp:Label>

<asp:TextBoxTabIndex="2"ToolTip='<%# Eval("CheckNumber") %>'ID="CheckNumberText"runat="server"Text='<%# Eval("CheckNumber") %>'visible="false"CssClass="ssNumberTextBox"Width="50px"></asp:TextBox>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"/>

<HeaderTemplate>

<asp:DropDownListID="VendorNameAdd"runat="server"DataTextField="VendorName"DataValueField="Id"CssClass="ssDropDown"Visible="true"Width="150px"></asp:DropDownList>

</HeaderTemplate>

<ItemTemplate>

<asp:LabelID="VendorLabel"runat="server"Text='<%# Eval("VendorName") %>'ToolTip='<%# Eval("VendorName") %>'CssClass="dropdownLabel"Width="150px"></asp:Label>

<asp:DropDownListTabIndex="3"ID="VendorText"runat="server"Visible="false"DataTextField="VendorName"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>

<asp:CustomValidatorrunat="server"ID="valVendor"ControlToValidate="VendorText"Display="dynamic">**</asp:CustomValidator>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"/>

<HeaderTemplate>

<br/>

<asp:DropDownListID="AccountNameAdd"runat="server"DataTextField="Account"DataValueField="Id"CssClass="ssDropDown"Visible="true"Width="150px"></asp:DropDownList>

<asp:RequiredFieldValidatorID="valAccountAdd"runat="server"InitialValue="-1"ControlToValidate="AccountNameAdd"ErrorMessage="You must select an account."ValidationGroup="validAdd">**</asp:RequiredFieldValidator>

<asp:CustomValidatorID="valAccountAddDDL"runat="server"Display="Dynamic"ControlToValidate="AccountNameAdd"ValidationGroup="validAdd">**</asp:CustomValidator>

</HeaderTemplate>

<ItemTemplate>

<asp:LabelID="AccountLabel"runat="server"Text='<%# Eval("Name") %>'ToolTip='<%# Eval("Name") %>'CssClass="dropdownLabel"Width="150px"></asp:Label>

<asp:DropDownListTabIndex="4"ID="AccountName"runat="server"Visible="false"DataTextField="Account"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>

<asp:requiredfieldvalidatorid="RequiredfieldAccount"Display="Dynamic"ControlToValidate="AccountName"Runat="server"InitialValue="-1"ErrorMessage="You must select an account."ValidationGroup="validEdit">**</asp:requiredfieldvalidator>

<asp:CustomValidatorID="valAccountDDL"runat="server"Display="Dynamic"ControlToValidate="AccountName"ValidationGroup="valEdit">**</asp:CustomValidator>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"/>

<HeaderTemplate>

<asp:TextBoxID="MemmoAdd"runat="server"TextMode="multiline"CssClass="ssMemoTextBoxAdd"Visible="true"Width="110px"Height="50px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="MemoAddWME"runat="server"TargetControlID="MemmoAdd"WatermarkText="Memo"WatermarkCssClass="memoTextBoxWM"></ajax:TextBoxWatermarkExtender>

</HeaderTemplate>

<ItemTemplate>

<asp:LabelID="MemoLabel"runat="server"Text='<%# Eval("Memo") %>'ToolTip='<%# Eval("Memo") %>'CssClass="memoLabel"Width="110px"></asp:Label>

<asp:TextBoxTabIndex="5"ID="MemoText"runat="server"Text='<%# Eval("Memo") %>'ToolTip='<%# Eval("Memo") %>'visible="false"TextMode="multiline"CssClass="ssMemoTextBox"Width="110px"Height="50px"></asp:TextBox>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"/>

<HeaderTemplate>

<asp:TextBoxID="IncreaseAdd"runat="server"CssClass="ssMoneyTextBoxAdd"Visible="true"Width="65px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="IncreaseAddWME"runat="server"TargetControlID="IncreaseAdd"WatermarkText="Increase"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>

<asp:CustomValidatorrunat="server"ID="valIncreaseAdd"ControlToValidate="IncreaseAdd"Display="dynamic"ValidationGroup="validAdd">**</asp:CustomValidator>

<asp:RegularExpressionValidatorID="IncreaseAddRegExp"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="IncreaseAdd"ErrorMessage="Increase amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAdd">**</asp:RegularExpressionValidator>

</HeaderTemplate>

<ItemTemplate>

<asp:LabelID="IncreaseLabel"runat="server"Text='<%# Eval("Increase") %>'ToolTip='<%# Eval("Increase") %>'CssClass="ssMoneyTextBox"Width="65px"></asp:Label>

<asp:TextBoxTabIndex="6"ID="IncreaseText"runat="server"Text='<%# Eval("Increase") %>'ToolTip='<%# Eval("Increase") %>'visible="false"CssClass="ssMoneyTextBox"Width="65px"></asp:TextBox>

<asp:RegularExpressionValidatorID="RegularExpressionValidator1"runat=serverDisplay="dynamic"ValidationExpression="^\d*?.\d{1,2}$"ControlToValidate="IncreaseText"ErrorMessage="Increase amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validEdit">**</asp:RegularExpressionValidator>

<asp:CustomValidatorrunat="server"ID="valIncrease"ControlToValidate="IncreaseText"Display="dynamic"ValidationGroup="validEdit">**</asp:CustomValidator>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"/>

<HeaderTemplate>

<asp:CheckBoxId="ClearedAdd"runat="server"CssClass="ssCheckBox"Visible="true"Width="28px"></asp:CheckBox>

</HeaderTemplate>

<ItemTemplate>

<asp:CheckBoxId="ClearedDisplay"runat="server"Checked='<%# Eval("CheckCleared") %>'Enabled="false"Width="28px"></asp:CheckBox>

<asp:CheckBoxTabIndex="7"Id="ClearedEdit"runat="server"Checked='<%# Eval("CheckCleared") %>'Visible=falseCssClass="ssCheckBox"Width="28px"></asp:CheckBox>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateField>

<HeaderStyleCssClass="ssHeader"HorizontalAlign="left"VerticalAlign="bottom"/>

<HeaderTemplate>

<asp:TextBoxID="DecreaseAdd"runat="server"CssClass="ssMoneyTextBoxAdd"Visible="true"Width="65px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="DecreaseAddWME"runat="server"TargetControlID="DecreaseAdd"WatermarkText="Decrease"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>

<asp:ButtonCommandName="Add"Text="Add"ID="btnAdd"Runat="server"CssClass="addButton"Visible="true"CausesValidation="true"ValidationGroup="validAdd"/>

<asp:RegularExpressionValidatorID="DecreaseAddRegExp"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="DecreaseAdd"ErrorMessage="Decrease amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAdd">**</asp:RegularExpressionValidator>

</HeaderTemplate>

<ItemTemplate>

<asp:LabelID="DecreaseLabel"runat="server"Text='<%# Eval("Decrease") %>'ToolTip='<%# Eval("Decrease") %>'CssClass="ssMoneyTextBox"Width="65px"></asp:Label>

<asp:TextBoxTabIndex="8"ID="DecreaseText"runat="server"Text='<%# Eval("Decrease") %>'ToolTip='<%# Eval("Decrease") %>'visible="false"CssClass="ssMoneyTextBox"ValidationGroup="validEdit"Width="65px"></asp:TextBox>

<asp:ButtonTabIndex="9"Text="Add"ID="btnAddGrid"Runat="server"CssClass="addButton"CausesValidation="true"ValidationGroup="validEdit"OnClick="btnAddGrid_Click"visible="false"/>

<asp:RegularExpressionValidatorID="DecreaseRegExp"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="DecreaseText"ErrorMessage="Decrease amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validEdit">**</asp:RegularExpressionValidator>

</ItemTemplate>

<ItemStyleCssClass="ssCell"/>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="IsVoid"HeaderStyle-CssClass="ssHeader"Visible="false">

<ItemTemplate>

<asp:LabelID="IsVoidLabel"runat="server"Text='<%# Eval("IsVoid") %>'CssClass="ssLabel"></asp:Label>

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

<tableid="tblAddEmpty1"runat="server"Visible="false"width="750px"bgcolor="#FAFFF9"cellspacing="0">

<tr>

<tdclass="ssHeader"valign="baseline">

<asp:TextBoxID="DateAddEmpty"runat="server"CssClass="ssDateTextBoxAdd"Width="70px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="DateAddEmptyWM"runat="server"TargetControlID="DateAddEmpty"WatermarkText="Date"WatermarkCssClass="dateTextBoxWM"></ajax:TextBoxWatermarkExtender>

<asp:RequiredFieldValidatorID="reqDateEmpty"runat="server"ErrorMessage="You must enter a transaction date."ControlToValidate="DateAddEmpty"Display="dynamic"ValidationGroup="validAddEmpty">**</asp:RequiredFieldValidator>

<asp:rangevalidatorid="valDateEmpty"runat="server"ErrorMessage="Transaction date is out of range or is incorrect format (mm/dd/yyyy)."

ControlToValidate="DateAddEmpty"MaximumValue="12/31/9999"MinimumValue="1/1/1753"Type="Date"Display="Dynamic"ValidationGroup="validAddEmpty">**</asp:rangevalidator>

<asp:ImageButtonID="calendarImgBtnEmpty"runat="server"TabIndex="-1"CausesValidation="false"ImageUrl="~/images/calendar button.bmp"/>

<ajax:CalendarExtenderrunat="server"ID="DateAddEmtpyExtender"PopupButtonID="calendarImgBtnEmpty"TargetControlID="DateAddEmpty"Animated="true"></ajax:CalendarExtender>

</td>

<tdclass="ssHeader">

<asp:TextBoxID="typeAddEmpty"CssClass="ssTypeTextBox"TabIndex="-1"runat="server"visible="true"Width="33px"Enabled="false"></asp:TextBox>

</td>

<tdclass="ssHeader">

<asp:TextBoxID="CheckNumberAddEmpty"runat="server"CssClass="ssNumberTextBoxAdd"Width="50px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="CheckNumberAddEmptyWME"runat="server"TargetControlID="CheckNumberAddEmpty"WatermarkText="Number"WatermarkCssClass="numberTextBoxWM"></ajax:TextBoxWatermarkExtender>

</td>

<tdclass="ssHeader">

<asp:DropDownListID="ddlVendorAddEmpty"runat="server"DataTextField="VendorName"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>

</td>

<tdclass="ssHeader">

<br>

<asp:DropDownListID="ddlAccountAddEmpty"runat="server"DataTextField="Account"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>

<asp:RequiredFieldValidatorID="valAccountAddEmpty"runat="server"InitialValue="-1"ControlToValidate="ddlAccountAddEmpty"ErrorMessage="You must select an account."ValidationGroup="validAddEmpty">**</asp:RequiredFieldValidator>

</td>

<tdclass="ssHeader">

<asp:TextBoxID="MemoAddEmpty"runat="server"TextMode="multiline"CssClass="ssMemoTextBoxAdd"Width="110px"Height="50px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="MemoAddEmptyWME"runat="server"TargetControlID="MemoAddEmpty"WatermarkText="Memo"WatermarkCssClass="memoTextBoxWM"></ajax:TextBoxWatermarkExtender>

</td>

<tdclass="ssHeader">

<asp:TextBoxID="IncreaseAddEmpty"runat="server"CssClass="ssMoneyTextBoxAdd"Width="65px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="IncreaseAddEmptyWME"runat="server"TargetControlID="IncreaseAddEmpty"WatermarkText="Increase"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>

<asp:RegularExpressionValidatorID="valIncreaseAddEmpty"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="IncreaseAddEmpty"ErrorMessage="Increase amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAddEmpty">**</asp:RegularExpressionValidator>

<asp:CustomValidatorrunat="server"ID="valIncreaseAddEmpty1"ControlToValidate="IncreaseAddEmpty"Display="dynamic"ValidationGroup="validAddEmpty">**</asp:CustomValidator>

</td>

<tdclass="ssHeader">

<asp:CheckBoxId="ClearedAddEmpty"runat="server"CssClass="ssCheckBox"Width="28px"></asp:CheckBox>

</td>

<tdclass="ssHeader"valign="baseline">

<asp:TextBoxID="DecreaseAddEmpty"runat="server"CssClass="ssMoneyTextBoxAdd"Width="65px"></asp:TextBox>

<ajax:TextBoxWatermarkExtenderID="DecreaseAddEmtpyWME"runat="server"TargetControlID="DecreaseAddEmpty"WatermarkText="Decrease"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>

<asp:RegularExpressionValidatorID="valDecreaseAddEmpty"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="DecreaseAddEmpty"ErrorMessage="Decrease amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAddEmpty">**</asp:RegularExpressionValidator>

<asp:ButtonText="Add"ID="btnAddEmpty"Runat="server"CssClass="addButton"CausesValidation="true"ValidationGroup="validAddEmpty"OnClick="btnAddEmpty_Click"/>

</td>

</tr>

</table>

<asp:PanelID="pageExtender"runat="server"Height="200px"></asp:Panel>

</form>

</body>

</html>


I finally got it to work. From this post: http://forums.asp.net/p/1095746/1653605.aspx#1653605

All I had to do was add<xhtmlConformancemode="Transitional"/>to web.config under system.web

UpdatePanel - Triggers - DetailsView

I have a page that contains an UpdatePanel as following

<UpdatePanel>

<ContentTemplate>

<DetailsView>

<Fields>

<TextBox ID=""/>

<DropDownList ID=""/>

</Fields>

</DetailsView>

</ContentTemplate>

<Triggers>

...

</Triggers>

</UpdatePanel>

The triggers refer to the fields of the DetailsView by their IDs, but when viewing the page I get an error that those IDs cannot be found in the UpdatePanel.

How can I reconfigure the triggers in order to make them work?

you get the error, because the trigger cannot see the id of the fields that is inside a detailsview. what you need to do is create a textbox or button outside the detailsview and have the trigger pointing to it.

you need to add some javascript to the field that is inside the detailsview to execute the textbox or button outside the details view.

e.g.

<asp:TextBox ID="txtT1" style="display: none" runat="server" />
<asp:DetailsView ...>
<Fields><asp:TextBox ID="something ..." onchange="JavaScript ...do someothing and call textchange" runat="server" />
</asp:DetailsView
<trigger>pointing to "txtT1" ...enentName="TextChanged" ./>

something like that ... hope it helps


Is there any simpler solution? Creating outside controls for every field + js - seems like a lot of work .


Hi,

Not creating outside controls for every field + js,just ont button.

I think if your detailview is inside the updatepanel and theChildrenAsTriggers property is true, there is no need to set trigger for it.

Best Regards,

Monday, March 26, 2012

UpdatePanel - works on one page, but not on another

I've implemented the MS Ajax UpdatePanel on one page in a site to to load a combo based on the selection of another combo without a postback.

It worked perfectly on my development machine, but failed without any javascript error or exception on the server. I suspected the config was a problem and made sure that all the options in my development config were transferred to the server--specifically, the Assembly binding and HTTPHandler settings. I downloaded and installed the Ajax Extensions MSI package on the web server, which is 2003.

A test page with just an update panel, a button, and a label works without postbacks when uploaded to the same web application, so it looks to me like the config is set up properly. The page that it doesn't work on inherits from a master page, and has the update panel in a usercontrol... When I save the page in IE, I can see that the Ajax scripts are being loaded in the scriptmanager resources.

What steps would I take next to figure out the problem?

It sounds very strange that asp:Update can work in one?web page,but not in another web page.Try to test your Ajax website in development machine through IIS and check if it works.There is no doubt that Ajax can work with master page/content page.Try to check the permissions in IIS which may affect the execution results.Do you create a web?application?when?you?create?a?new?
virtual?directory??Do?you?set?Executable?Permissions?for?"Scripts only"?or?"Scripts and Executable"??Try?to?add?"Network Service"?to?the?virtual?directory?in?IIS?through?right?mouse?clicking?on?the?virtual?directory.
If you still have any questions about this,try to post some codes here which will help us to fix the problem.
Wish this can help you.

UpdatePanel & Safari

Hi

On my page I have an updatepanel which works fine in all browsers, but not in Safari. I've been searching a lot on the internet (and on this site) for the problem.

I've found a lot of topics where people have the same problem as me.
For example:http://forums.asp.net/thread/1237608.aspx
This person posts that the problem is solved in the March-edition of Atlas, but I'm using the latest version, the April-edition.

Is there still a "bug" in Atlas for Safari-browsers or is there knowledge of some unsupported atlas-functions in safari?

Thanks in advance for the information.

Mathias.

haai. One of my colleagues has run into problems on Safari also. We're not sure if the problem is Atlas or something to do with our own code. Did you find out anything more about this?
SAME PROBLEM ON JUNE 27
UpdatePanel is currently not supported on Safari.

UPDATEPANEL (FindControl?)

I have an update panel with a place holder in which I load a user control when the page loads.

The user control has a button. What I would like is for that button to load another control in the update panel.

I thought I could utilize FindControl, but so far I am having no luck.

It is so easy to load controls into an update panel when the button is not contained in that update panel. But what if I want to use the update panel as if it were a frame?

Any ideas?

I tested to load user controls dynamically through asp:UpdatePanel.If you load user controls dynamically in Page_Load event handler,the loaded user controls can keep in a web all the time.Otherwise they will fade when there are any events to?be triggered.
Here are my testing codes for you.
User control 1:
<%@. Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl1.ascx.cs" Inherits="Web_User_Controls_WebUserControl1" %>
<table>
<tr>
<td><asp:Label ID="lblUserName" runat="server" Text="User Name"></asp:Label></td>
<td><asp:TextBox ID="tbUserName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td><asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label></td>
<td><asp:TextBox ID="tbPassword" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td><asp:Button ID="btnLogon" runat="server" Text="Logon" /></td>
<td><asp:Button ID="btnCancel" runat="server" Text="Cancel" /></td>
</tr>
</table
Web User Control 2 to Load Web User Control 1:
<%@. Control Language="C#" AutoEventWireup="true" CodeFile="WUCLoadControls0.ascx.cs" Inherits="Web_User_Controls_WUCLoadControls0" %>
<asp:Label ID="lblLoadUserControl" runat="server" Text="Load User Controls Dynamically" BackColor="#C0FFC0"></asp:Label>
<asp:PlaceHolder ID="PH" runat="server"></asp:PlaceHolder>
<asp:Button ID="btnLoadControls" runat="server" Text="Load Another User Control" OnClick="btnLoadControls_Click" />

protected void btnLoadControls_Click(object sender, EventArgs e)
{
PH.Controls.Add(LoadControl("~\\Web User Controls\\WebUserControl1.ascx"));
}

.ASMX HTML:
<div>
<asp:UpdatePanel ID="upnlWaterMarkExtender" runat="server">
<ContentTemplate>
<asp:PlaceHolder ID="phLoadUserControl" runat="server"></asp:PlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
</div>
Page_Load Event Handler:
PlaceHolder phLoadUserControl = upnlWaterMarkExtender.FindControl("phLoadUserControl") as PlaceHolder;
phLoadUserControl.Controls.Add(LoadControl("~\\Web User Controls\\WUCLoadControls0.ascx"));

As a result,I find that?FindControl in asp:UpdatePanel can work fine.
Wish this can help you.

Well, how about this.

ON default.aspx, I have an updatepanel. In the updatepanel is a user control:

<asp:UpdatePanel ID="upMsg" runat="server" UpdateMode="Always">
<ContentTemplate>
<quarem:messages ID="msgcenter" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>

Now, the user control simply contains a placeholder in which is loaded 1 of 2 user controls based on a session variable:

<asp:PlaceHolder ID="messagecenterplaceholder" runat="server" />

[code behind]
Page_Init
Select Case session("message")
Case "write"
(load write)
Case Else
(load read)
End Select

So, so far this is good. Everything works. The problem is when I actually load the read part.
There is a button that changes the session and then should update...

What I am trying is:

dim up as UpdatePanel = ctype(findcontrol("upMsg"), updatepanel)
up.update

But this does not work. It gives me the old "object reference not set to an instance of an object" error... so obviously FindControl is not finding the control.

Any suggestions?


I have the same problem. I can't find any dynamically added control to a placeholder (inside an UpdatePanel) with FindControl method.

UpdatePanel / DataGrid / Internet Explorer Lock up

Hi!

I'm facing a strange problem and would like to know if anybody can help me out!
I've a page with 5 UpdatePanels which all use the same asynchronous Postback Trigger (a DropDown Box).

e.g.

<asp:ScriptManagerID="_scriptManager"runat="server"EnablePartialRendering="true">

<Services>

<asp:ServiceReferencePath="../services/positions.asmx"/>

</Services>

</asp:ScriptManager>

<asp:UpdatePanelID="UpdatePanel2"runat="server">

<ContentTemplate>

<asp:GridViewBorderWidth="0"CellSpacing="0"cellpadding="3"Width="100%"ID="grdCash"runat="server"ForeColor="#333333"GridLines="Horizontal"AutoGenerateColumns="False"ShowFooter="False">

<FooterStyleBackColor="#5D7B9D"Font-Bold="True"ForeColor="White"/>

<RowStyleBackColor="#F7F6F3"ForeColor="#333333"/>

<EditRowStyleBackColor="#999999"/>

<SelectedRowStyleBackColor="#E2DED6"Font-Bold="True"ForeColor="#333333"/>

<PagerStyleBackColor="#284775"ForeColor="White"HorizontalAlign="Center"/>

<HeaderStyleBackColor="#5D7B9D"Font-Bold="True"ForeColor="White"/>

<AlternatingRowStyleBackColor="White"ForeColor="#284775"/>

<Columns>

<asp:BoundFieldItemStyle-Width="80"DataField="SEGMENT"HeaderText="SEGMENT/CCY"HeaderStyle-HorizontalAlign="center"ItemStyle-HorizontalAlign="center"/>

<asp:BoundFieldDataField="DATUM"HeaderText="DATUM"HtmlEncode="False"DataFormatString="{0:dd.MM.yyyy}"HeaderStyle-HorizontalAlign="center"ItemStyle-HorizontalAlign="center"/>

<asp:BoundFieldDataField="FREE_CASH"HeaderText="FREE CASH"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="left"ItemStyle-HorizontalAlign="left"/>

<asp:BoundFieldDataField="SETT_TRANS"HeaderText="SETT.TRANS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="CPNS"HeaderText="CPNS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="REDEMPTIONS"HeaderText="REDEMPTIONS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="CASH_TRANSFERS"HeaderText="TRANSFERS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="DEPOSITS"HeaderText="DEPOSITS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="MAT_TD"HeaderText="MAT.TD"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:TemplateFieldHeaderText="VALID"HeaderStyle-HorizontalAlign="center"ItemStyle-HorizontalAlign="center">

<ItemTemplate>

<asp:ImageID="imgValid"BorderStyle="None"runat="server"/>

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlID="drpFonds"/>

</Triggers>

</asp:UpdatePanel>


The strange thing is that after a couple of refreshes (through the async postback trigger drpFonds) the Internet Explorer ( on the client ) locks-up and CPU utilization goes up to 100%.
I use some javascript code on this page, but there aren't any loops or timers (like setinterval etc.)
The partial postback executes some SQL queries and updates the datagrid(s) - nothing else happens.
I can't figure out what's wrong. Can anybody give me some hints on how to debug such a problem?

Thank you!

Regards
Holger

I had a problem just like that. It turned out that I was using a

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(calledFunction)

without removing it using

Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(calledFunction)

Every time the update panel posted back it added another delegate call to the event. So over time the target function was being called over and over and over until it crashed the browser.

UpdatePanel .Net Treeview.PopulateOnDemand conflict?

I am having a problem where the first use of an update panel on my page seems to deactivate the Treeview.PopulateOnDemand event.

I have a .Net 2.0 treeview set up to browse hierachical data. It implements PopulateOnDemand to avoid having to display all the data at once. The EnablePartialRendering property of the ScriptManager is set to true.

I also have an update panel on the page that populates a datagrid when the user selects a treenode.

PopulateOnDemand works fine until theSelectedNodeChangedevent triggers the refresh of the update panel. Then PopulateOnDemand doesn't work anymore.

The application works properly if I set the EnablePartialRendering property to false, but then of course I get a visible postback, which I don't want.

I have read that the .Net 2.0 treeview implements some version of Atlas, and it may be the case that this is the source of the conflict between the treeview and the update panel.

Has anyone encountered a similar problem? Can anyone suggest a workaround?

And an update:

I downloaded Nikhil Kothari's Web Development Helper (what an amazing tool) and found a 500 error when I tried to repopulate nodes after using the update panel -- this explains why the node won't populate.

To reiterate what everyone else has already said, the first thing you should do when you have problems with Atlas is download Nikhil's tool (which I finally did).

The 500 error, in turn, has it's source in this error message --The state information is invalid for this page and might be corrupted.

So apparently using the update panel does something to the viewstate that makes the treeview not work properly anymore. But I can't disable viewstate since both the update panel and the treeview seem to need it.

So now that I've tracked down and isolated the error, It's still a stumper because, from looking throught the asp.net archives, it looks like the viewstate error is also a semi-mysterious problem in ASP.Net 2.0.

Help?

updatepanel , registerstartupscript gives me "Only one instance of a ScriptManager can be

i have a formview with a updatepanel nested in it. Also i m not using any masterpages so i have only one scriptmanager on the page. The page works fine without UpdatePanel/ScriptManager but if i have the UpdatePanel/ScriptManager on the page and i try to update the formview i get this error. here is similar code:

formview_itemupdated()

{

page.registerstartupscript(............);
formview1.databind(); //error occurs here
}

I also have some client javascript on in the <head> tags. Anyone know why is there an error? thanks

You now have to use the ScriptManager to register scripts from within an UpdatePanel, see:http://asp.net/AJAX/Documentation/Live/mref/O_T_System_Web_UI_ScriptManager_RegisterStartupScript.aspx

In short, the reason is because during a partial postback the ajax framework is looking for data that comes from the server to be in a special format.


I think i dint make myself clear in explaining the issue. the formview_itemupdated() is triggered by a button outside the UpdatePanel so i want a full postback. changing the Page.RegisterStartupScript to ScriptManager.RegisterStartupScript doesnt help either. I still get the same error. here is the hierarchy of my controls

<form view>
<templatefield>
<updatepanel/>
</templatefield>
<templatefield>
<mybutton that causes full postback by calling formview_itemupdated() />
</templatefield>
</formview>


i had scriptmanager nested in formview, i took it out of it and problem solved.


Ok, good. Sorry about the misunderstanding. For future reference: place the script manager at the top of the page and if possible, in the master page.


thanks David, also i will check out ur book =)

UpdatePanel + Master Pages = too much processing?

Hi there,

What if I want to make my whole site Atlas-enabled in one step. That is, putting an UpdatePanel in the Master Page and putting the contentplaceholder inside it. That way, all the site's content is "inside" the UpdatePanel.

What do you think of this approach? Is it overkill for the server?

Thanks for any opinions,

-Benton

Personal thought, yes it would be. What I'm doing is putting a Script Manager in the Master Page and then the Update Panels in whatever pages I want them in. Some pages I don't want to have Atlas functionality in, due to server stuff and sometimes I just flat out need a postback.

So, unless you're on a mega server, I'd probably recommend against that.

UpdatePanel + JavaScript - window.close()

Hello!

Situation: 2 pages. ASP.NET 2.0, Microsoft Ajax Extension Beta 2, IIS6.

On first page by Click on "Show" button (asp:Button) - worked next Client Java script code - "window.open( 'page2.aspx', '', '' );".

Page2 - contents UpdatePanel and button "Close" (asp:Button) with follow simple Java script code: "self.close();".

If I'm click on "Show" button 3 times and close second page on "Close" button I have persist situation when IE not load second page and don't load any pages in 1 page after second page is closed.

If I'm put "Close" button outside UpdatePanel - all work right.

Thank you,

for any comments.

Igor

I think you have following code:

page1.aspx:
<asp:Button runat="server" ID="btn" OnClientClick="window.open('page2.aspx','','');" Text="Open" />

page2.aspx:
<asp:Button runat="server" ID="btn" OnClientClick="self.close();" Text="Close" /

1. Is there any reason than you are using <asp:Button /> instead of simple <input type="button" /> ?

2. for some control sets asp.net places following onclick code "__doPostBack('btn','')" to <asp:Button />. and you result onclick = "self.close();__doPostBack('btn','')". you can check it viewing page source in browser. (you can use OnClientClick="window.close();return false;//")

3. I always use window.close() instead of self.close();

so try rewrite code like this:

page1.aspx:
<input type="button" onclick="window.open('page2.aspx','',''); return false;" value="Open" />

page2.aspx
<input type="button" onclick="window.close(); return false;" value="Close" />

I think this must work ;)


Thank you!

It's work.

UpdatePanel + Infragistics Treeview

I am trying to create a very simple UpdatePanel + Treeview page. The data is initally loaded (via code, recursive nodes added in code behind) the tree loads fine.

As soon as I click on a node (and capture the NodeClick event) the Tree view stops working and reports a Javascript error. "Microsoft JScript runtime error: 'undefined' is null or not an object"

Has anyone seen this before? Do the Infragistic controls not work with Atlas?

Thanks in advance.

Are you using the Tree's Automatic SmartCallback LoadOnDemand behavior, or Manual LoadOnDemand? I would recommend using the Tree's own AJAX enabled LoadOnDemand functionality, even inside of the UpdatePanel, since you really only need to update the tree. If you still have difficulty, please contact Infragistics Developer Support (http://devcenter.infragistics.com)

Also, if you have a valid Subscription, we are about to release our 2006 Volume 2 Beta. We've made some changes in order to better support Atlas, and it would be great if you could validate whether it fixes your current problems or not.

-Tony

Anthony Lombardo
Infragistics, Inc.
Product Manager | NetAdvantageASP.NET

Saturday, March 24, 2012

UpdatePanel + MultiView + TreeView do not work

HI

I have simple master page having the ContentPlaceHolder inside an UpdatePanel.

<%@dotnet.itags.org. Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %><!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"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </ContentTemplate> </asp:UpdatePanel> </div> </form></body></html>

My content page has a MultiView and Two View controls. Each View control has a TreeView inside. My problem is the TreeView in the first View can expand/collpase but the one in the second view has no response when clicking on it. What is going on?
<%@dotnet.itags.org. Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="TemplatedPage.aspx.cs" Inherits="TemplatedPage" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <asp:Button ID="Button1" runat="server" Text="Switch pane" OnClick="Button1_Click" /> <asp:MultiView ID="mv1" runat="server" ActiveViewIndex="0"> <asp:View ID="view1" runat="server"> <asp:TreeView ID="TreeView1" runat="server"> <Nodes> <asp:TreeNode Text="Tree 1" Value="Tree 1"> <asp:TreeNode Text="New Node" Value="New Node"></asp:TreeNode> </asp:TreeNode> </Nodes> </asp:TreeView> </asp:View> <asp:View ID="view2" runat="server"> <asp:TreeView ID="TreeView2" runat="server"> <Nodes> <asp:TreeNode Text="Tree2" Value="Tree2"> <asp:TreeNode Text="New Node" Value="New Node"></asp:TreeNode> </asp:TreeNode> </Nodes> </asp:TreeView> </asp:View> </asp:MultiView></asp:Content>

Code behind:

public partialclass TemplatedPage : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e) { }protected void Button1_Click(object sender, EventArgs e) {if (mv1.ActiveViewIndex == 0) mv1.ActiveViewIndex = 1;else mv1.ActiveViewIndex = 0; }}

From my limited knowledge treevie and menu controls are not currently supported in the ajax enviroment.. thus you will need to resort to a iframes approach or simply not place menu or treeview controls into a update panel. It is the Goal however of the Asp.Net to make all current .Net controls usable with the update panel but it won't most likely happend until the release of Orcas..

It is probably related to my problem with the Multiview control:

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

Updatepanel a fake?

Try the demo on http://atlas.asp.net/quickstart/atlas/samples/controls/UpdatePanel2_cs.aspx. Each time you hit the button a full page refresh occur. Is the updatepanel in the current state a fake?

I'm having the same experience on both the sample page and in my own test. What gives? The progress bar fires, you loose your scroll position and the back button is enabled. Sure seems like a full page refresh to me.

If you read the blog:http://www.nikhilk.net/AtlasM1.aspx, it says:

>>

<atlas:ScriptManager runat="server" id="scriptManager"EnablePartialRendering="true" />
One little attribute with lots of magic behind it. Rather than performing a real postback, we simulate a postback using the familiar XMLHTTP object (or in Atlas using the Web.Net.WebRequest class).

<<

If internally it's using XMLHTTP to call the server then you shouldn't be seeing the progress bar, loosing scroll position or having a back button enabled. My conclusion: there's a bug or UpdatePanel's ability is over-stated.


It's not a fake. Rather, it's just outdated.

If you're trying this out locally, then you have to recode few lines. For example...

Change:

<atlas:UpdatePanelrunat="server"ID="UpdatePanel1"Mode="Always">

<ContentTemplate>

<strong>

<spanstyle="text-decoration: underline">Shipping Address</span>:

</strong>

<br/>

<asp:LabelID="lblFirstLineShipping"runat="server"Font-Bold="False"></asp:Label><br/>

<asp:LabelID="lblSecondLineShipping"runat="server"></asp:Label><br/>

<asp:LabelID="lblThirdLineShipping"runat="server"></asp:Label><br/>

</ContentTemplate>

</atlas:UpdatePanel>

<asp:ButtonID="btnCopy"runat="server"Text="Same As Billing Address"OnClick="btnCopy_Click"CausesValidation="False"/>

To:

<atlas:UpdatePanelrunat="server"ID="UpdatePanel1"Mode="Always">

<ContentTemplate>

<strong>

<spanstyle="text-decoration: underline">Shipping Address</span>:

</strong>

<br/>

<asp:LabelID="lblFirstLineShipping"runat="server"Font-Bold="False"></asp:Label><br/>

<asp:LabelID="lblSecondLineShipping"runat="server"></asp:Label><br/>

<asp:LabelID="lblThirdLineShipping"runat="server"></asp:Label><br/>

<asp:ButtonID="btnCopy"runat="server"Text="Same As Billing Address"OnClick="btnCopy_Click"CausesValidation="False"/>

</ContentTemplate>

</atlas:UpdatePanel>

You could also have used <Triggers> to define this as well. Being that Atlas is a work-in-progress, it's understandable that samples may not work, but I wish someone would take care of bringing these samples up-to-date so that newbies like us can learn from them.


Sure enough, that seemed to do it. I just had to move the button and the thing being updated inside the UpdatePanel (or even in separate UpdatePanels) and it works great.

Thanks!


Yes, we haven't wuite caught up these samples. They'll be fixed up really soon :). Just to rre-iterate, the controls within a UpdatePanel will aautomatically cause an async callback but controls outside the UpdatePanel will now still perform a regular postback, unless they are tied to UpdatePanels through triggers.

UpdatePanel and 3rd Party Controls

I've been doing some tests with Infragistics controls (v.2006 CLR2.0) and finding many problems with them when they're on the same page as the UpdatePanel. Even when they're not inside the panel, they don't render properly after an Atals callback, they lose their client-side js events, etc. Figured it was just a conflict in the way Infragistics was doing their rendering, until I downloaded another toolset (Janus Systems) that started exhibiting the same behavior.

Is there something about the way the UpdatePanel renders that is problematic for 3rd party vendors? I find it odd that these components re-render when there's an UpdatePanel callback when they'renot inside the panel. Is this a problem with the 3rd party components or the way UpdatePanel is architected? We're trying to make some purchasing decisions on a toolset and this is causing much consternation.

Thanks for any input anyone can provide.

Andy

We are having the same issue with Infragistics controls (2005v3) and both the MS Atlas UpdatePanel controls and another AJAX implementation, MagicAjax. I would like to see if anyone else has found a workaround or at least the root cause as well.