[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Asp.net AJAX According Panel with GridView

Posted on 2009-05-12
4
Medium Priority
?
1,434 Views
Last Modified: 2012-08-14
Hello to all its been a while and I am stuck on this one.
Ok here it is.
First and foremost I have a gridview which works perfectly. When I mean perfectly I mean you can update/delete/select/index change / etc. This gridview is part of a usercontrol which I call on my page.

Now the problem is when I put this gridview in an Ajax Accordian Panel which makes the
users can click on the panel to slide up or down. When the Users decides to click on the next page index, or Edit controls I get this error
"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.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. "

Again this only happens when I put the gridview within the Accordian Panel..if I don't have it in there then I get no error at all.

Is there a solution to this madness LOL.
Thanks in Advance guys for helping this noob :).


This is my Front End Code for the accordian panel..which my gridview is pullout of a user control
<cc1:Accordion ID="AccordMain" runat="server">
    <Panes>
                <cc1:AccordionPane ID ="AccordColor" runat ="server">
             <Header><div class ="TitleRoll"  style="display:block; border:2px navy outset;   color:White;"> Add / Edit Color </div> </Header>
               <Content>
                  <ucIntCol:ucIntColors ID ="UcColor" runat ="server" />
               </Content>
            </cc1:AccordionPane>
             
    </Panes>
   
    </cc1:Accordion>

Open in new window

0
Comment
Question by:saruman101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Expert Comment

by:MrAgile
ID: 24372739
Hi There,

What version of .net are you using? What server os is the application running on?

Sean
0
 

Author Comment

by:saruman101
ID: 24375614
I'm building this web application with visual studio 2008 .net framework 3.5
My current OS is windows 7 RC which is on my desktop.
And as for my web server right now I'm just currently using the built in version of Visual Studio so I'm not using IIS yet.
0
 
LVL 2

Expert Comment

by:krishrr
ID: 24376155
If u need to add a different control on each postback to the same placeholder don't do that and instead make a different placeholder for each different control and each control should be added to a certain placeholder (don't add different kinds of control to the same placeholder at the same location)

OR

You can set enableviewstate=false on the control if u don't need the viewstate
0
 

Accepted Solution

by:
saruman101 earned 0 total points
ID: 24376415
Hey guys I figure it out...and I guess it was by luck.

Ok first of all I do have different controls on different placeholders and the only one that was giving me the problem was the gridview itself.Well it turns out to be that in my user control within the grid view I had a small DIV tag which for what reason I don't remember why I had that there but it was there.

So when I would put the user control into the accordian pane it would then include the div as well within inside the accordian. When I would click on anything within the grid whether it was to update/paging/etc I would get the error. As soon as I remove the DIV tag everything works as it suppose to be.

Thanks guys for your help and advice :)
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question