Please..
Sorry my poor English...
Exception in postback if web page include WebDialogWindow..
Error Message : Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request
I'm using ContentUrl in WebDialog.. html content from my extern url is render in self page, after load completed, any postback is fire exception Thanks..
I have a web page with a dialog window which shows an external web site. I am getting no errors in postback.
Sending the code you are using may help to understand the problem you are experiencing.
Thanks by response.
WebDialigWidows Code: (I change ContentUrl by UserControl but the problem persist.
<ig:WebDialogWindow ID="webVehicleDialog" runat="server" StyleSetName="Office2007Blue" Height="470px" InitialLocation="Centered" Modal="True" Width="820px" WindowState="Hidden" Moveable="False"> <ContentPane ScrollBars="Hidden"> <Template> <uc1:policyVehicle ID="PolicyVehicle1" runat="server" /> </Template> </ContentPane> <Header CaptionText="Policy Vehicles "> </Header> </ig:WebDialogWindow>
ASP Button Code :
<asp:LinkButton ID="btnCopy" runat="server" CausesValidation="false" OnClick="btnCopy_Click">Copy</asp:LinkButton>
Postback button throw exception. If i remove WebDialogWindow control from page.. no errors in postback throw.
Thanks
I have never tried placing a User Control inside a dialog window, and your code gives no idea about the User control functionality.
Perhaps someone from Infragistics could comment, or you may wish to report this a a possible error. (Ask for Help option in the Get Help menu on the main Infragistics page).
Thanks samsonca..
I don´t know what happen in this form.. I use master page, and use UltraWebGrid control too, may be my user control include code that throw exception.. before include infragistics controls i used http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Animation/Animation.aspx ajax control and we can´t problems.
if i change user control and use contentUrl any postback throw exception too.
thanks by your time.
Okay, Trying to find the problem I have completely removed the contents of WebDialogWindows.
<ig:WebDialogWindow ID="webVehicleDialog" runat="server" StyleSetName="Office2007Blue" Height="470px" InitialLocation="Centered" Modal="True" Width="820px" WindowState="Hidden" Moveable="False"><ContentPane ScrollBars="Hidden"><Template>Testing control....</Template></ContentPane><Header CaptionText="Policy Vehicles "></Header></ig:WebDialogWindow>
The problem persists. This means that the content has nothing to do with us what is going on. If remove WebDialogWindows from page, everything runs correctly.
Continue test, i remove AjaxControlToolkit <cc1:ConfirmButtonExtender .... </cc1:ConfirmButtonExtender> the problem persist...i remove <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Width="100%" BorderStyle="None"> used in UltraWebGrid.. the problem persist.. i remove UltraWebGrid ... the problem persist.. The rest of the code is HTML, and the 2 button, one open dialog using javascript and other that makes the postback.
Please.. any help?
I have taken your code and pasted it into a new website, and it works !!!
All I added was a button and some javascript to display the webdialog.
I have attached a zip file with the files :-
Default.aspx Default.aspx.vb web.config
You can paste these into a new web site, and you will have to import the style 'Office2007Blue'
If this does not run on your machine, then I think you need to look at the versions of the Infragistics controls you are running.
On my machine, I have VS2008 Team Edition, Infragistics 2008 V1
Let me know if this works.
Hi, :(
I don´t know what happen in my project.. finally, i have WebDialogWindow runing okay.
In my project i don´t use LoadControl or Controls.Add.. I'm using VS 2005 CLR 2.0.. if remove WebDialogWindow (in aspx page, not in master page) with AutoEventWireup in the Master page to true.. all worked .. if add WebDialogWindow in aspx page with AutoEventWireup in the Master page to true, throw exception.. if set AutoEventWireup in the Master page to false, all worked!! :(
thanks very much by your time samsonca..
Very hard to tell based on what I've seen in this forum thread. The error message you get is typically a generic ASP.NET error - if you are loading controls dynamically to placeholders (e.g. Page.LoadControl or PlaceHolder1.Controls.Add - and somehow they are loaded in different places after postback, this error occurs.
Maybe you can attach a small subset of your project reproducing the problem here or send it directly to Developer Support for additional information.
I added a simple Master page to my test project (Just a div at the top of the page), added a new page which inherits the Master page, and copied the code across. I had to change the javascript to open the dialog, adding 'ct100_ContentPlaceHolder1' in the $find to reference the dialogwindow.
I then ran the page with no AutoEventWireup in the Master page, and all worked. I then set AutoEventWireup in the Master page to true, and again all worked. I then tried every combination of AutoEventWireup in both the Master page and the web page, and again all worked !!!
On my own website I use Master pages and have dialogwindows being displayed correctly, some even having other Infragistics controls inside the dialogwindows.
Your problem seems to stem from using VS2005 and CRL 2.0, I am not sure why, but remember that AJAX is now built into VS2008.
Perhaps someone at IG could help ?
I have added a button to the page of code I sent you, and I can execute a postback with no errors !!
I have also added a button inside the dialogwindow, and this can postback with no errors !!
Check the version numbers of the IG controls.
Let me know your results.