.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Update panel problem in gridview footer

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net

On my aspx page, I'm having troubles when I have an update panel within the footer template of a gridview. It appears to be an intermitent problem that occurs on subsequent postback when you do a delete command in the gridview. The first delete command always goes through fine (first postback). Clicking on another row to delete on the gridview (or any other button on the form) triggers this error:

An error has occurred because a control with id 'ctl00$SupremeContent$grdLineNumbers$ctl09$ctl00' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error.

If you click the back button in the browser, then click on another page, then come back to this page, you can delete another record. Another attempt to delete another record brings you back to the above problem. Thectl00$SupremeContent$grdLineNumbers$ctl09$ctl00 changes each time you delete, come back to the page and delete.

If I disable the udpate panel, there's no errors.

The reason I have the update panel is so that the user can select the relevant pipe specification (they see multiple columns using a textbox, drop down extender, panel and gridview) without the form's data being reset by the embedded gridview's

View Complete Post

More Related Resource Links

Problem with master page and update panel (I think)



the app I am working with is made up of three nested master pages that have the following design:

The first master page ha only realize the HEADER, BODY and FOOTER divs.

The second one specialize the Body content placeholder and divide it in three more layers: NAVIGATOR, PAGE TITLE, BODY CONTENT.

The final layer specialize the BODY CONTENT in PAGE CONTENT and ACTIONS.

In one of my content pages I have (inside the PAGE CONTENT area) 

  • 1 Update Panel that contains a gridview object
  • 1 Update Panel that contains some HTML code to show in a PopupModalExtender

The PopupModalExtender can be either triggered from inside the gridView and also from a series of LinkButtons that are in the ACTIONS area.

The problem is that when the PopupModalExtender shows the FOOTER and the ACTIONS areas are not dimmed from the style I apply as background to the modal popup. An example of what I am trying to explain can be viewed in the following screenshot.

Why this is going to happen? Has anybody any suggestion on how to solve this problem?

Thanks a lot

Gridview's in Update Panel not updating

I have 2 gridviews in an update panel that for some reason will not update.  There is no data entry, paging, sorting going on, the data is just there to be displayed.  I'm using a timer that initiates every 5 minutes to trigger the updatepanel.  I also have an updatepanel on an additional page where I am also using a trigger to fire the updatepanel with 2 charts and 1 oneline/column gridview.  The 2 charts update just like they are supposed to however the gridview does not. Here is the code for the 2 Gridview aspx page:</head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Timer ID="Timer1" runat="server" Interval="300000" Enabled="True"> </asp:Timer> <br /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /> </Triggers> <ContentTemplate> <table class="style1"> <tr>

problem with update panel height

I am using ajax update panel to show a tree without postback there is a label that is at the top of the panel I am hiding the label while showing the tree. document.getElementById('ctl00_phldDialogBody_lbltext').style.display = "none"; in the javascript but even after hiding the space of the label is still left blank causing the tree to be moved down pls help to fix it i want the tree to be at the same position

update panel and jquery problem

I m working on JQuery, I have one UserControl in that I have taken one button(it is present inside an updatePanel).  when i m clicking on button on that time i want to show alert from server side for that i have written-  ScriptManager sm = ScriptManager.GetCurrent(Page); string strScript = "alert('hi')"; ScriptManager.RegisterStartupScript(this, typeof(UserControl_FrmUConFriendList), "AlertKey", strScript , true); But it is not working, if i m removing updatePanel then it is working. So plz help me. Thank's in advance.    

Problem with User Control, Update panel and flicker


I have  block of code that consists of a textbox a button and a dropdown. The text entered in the text box filters the dropdownlist when the user clicks the button. The Ajax works great when it is in a simple page but if I put the same code in a User control I get flicker. Can anyone assist with this issue?

How to Refresh Gridview data from update panel in specified time


hello frnds,

i have some search criteria.

after filling all criteria when i press search button the result arrives in gridview nw when searchbutton pressed after that every 20seconds i want 2 update gridview data which is in update panel

problem with user control+update panel+javascript


hai all,


Im having a aspx page which has 5 tabs inside a update panel..also I have a user control

Wen I click each tab im dynamically loading dat user control .

The problem is im using javascript in dat user control..

the user control has a button which displays a panel containing three grid views  n s activated by a java script as given below..

function Elig()



'<%=btnLegend.ClientID %>')).click(function(){


('<%=pBody.ClientID %>')).slideToggle('slow');




Wen i run the aspx page the first tab  successfully loaded with dat user control n a

Back button and update panel problem



I have a search page that uses an AJAX update panel to deliver results to the user. They can then navigate to a product page for more info. So far so good...

My problem occurs when they are on a product page and use the back button. They are redirected to the search page, but its a blank search page and not the one they left when they clicked for product details. I realise this is because the browser only made a history 'marker' (I dont know the technical term) when they first came to the search page, so this is what it returns them to.

Does anyone know how I can make the back button redirect the user to the search page as it was when they left it? I have tried making the page expire immediately and storing the search terms in session state so I can rebuild the page when they click 'back'. This works in IE, but not in Firefox as it seems to just load out the old page from the cache regardless of the expiration policy I set. As if that werent bad enough, this also causes 'corrupted state information' error when they try to search again.

Any suggestions? Any help would be very much appreciated.

Thank you

(PS -  I have seen various solutions to the back button/ajax problem, but none of them seem to address my problem. Or have I missed something?)


Problem in Linqdatasource update in gridview-Only first row updated.


I have detailsview 

<asp:DetailsView ID="dtlviewRecommendation" DataSourceID<

Update Panel - GridView



           I m displaying Image below GridView depending on the selected row. If I select another row, total page post backs.

I dont want to postback whole page Instead I want to change Image depending on the selected row.

May I know how to use Update Panel for this.


Modal Popup Extender and an Update Panel - "Cancel" Button problem


This should be a quick "yes" answer - I am in the process of creating a very simple test, but I thought I'd ask on here too (also, so other people might be able to find the answer, if they have the same problem).

I have created a modalpopupextender that opens up a panel containing an update panel.  I have a cancel button that is tied into the MPE's [CancelControlID] property and this closes the popup when I click it.  However, if I perform a partial postback within the update panel, the cancel button no longer works.  I have found an example online that seems to imply that the cancel button (and I'm guessing, by association) and the OK button should be outside the update panel.  Does the partial postback break the buttons' client script bindings, and thus should they always be placed outside the update panel?

problem with greybox inside update panel


Hi ,

i am using an link which displays the window in a grey box

<script type="text/javascript"> var GB_ROOT_DIR = "<%= ConfigurationSettings.AppSettings["SunTrust.SOS.BaseURL"] %><%= ConfigurationSettings.AppSettings["Root_Dir_Lightbox"] %>";

<script>script type="tex

Update Panel Postback Problem?



Related to my previous question which is answered. The deal is, there is an update panel for modalpopup extender that is triggered by a button. The problem is when the form is submitted by a button, this modal popup is seen on the page! I do NOT want this modal popup extender to be seen when the form is submitted.

Any help please?

Thanks in Advance.

Best regards.

<asp:Label ID="lblPopupTargetID" runat="server" Style="display: none;"></asp:Label>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="lblPopupTargetID"
PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true" />
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Width="600px">
<asp:UpdatePanel runat="server" ID="UpdatePanel1">

Update Panel Problem?



I want to update a portion of my page. There is a dropdownlist and a checkbox. I want to update checkbox (checked...etc) when user changes the selected index of dropdownlist. Here is the code below. But it does NOT update the check box?

Any help would be great.

Thanks in advance.

 <asp:UpdatePanel runat="server" ID="UpdatePanel9" UpdateMode="Conditional">
                            <asp:CheckBox ID="CheckBox_otipi" runat="server" Text="<%$ Resources:OdemeTalep, CheckBox_otipi %>" />
                            <asp:AsyncPostBackTrigger ControlID="DropDownList_parabirimi" EventName="SelectedIndexChanged" />

Gridview update problem with related tables


Hi all,

I have a problem in getting my gridview to update. The datasource gets its data from 2 related tables using the following select statement:

SELECT StudentSubject.StudentID, Students.[1stName], Students.Surname, Students.Grade, StudentSubject.Subject, StudentSubject.GradeOverall, StudentSubject.ReportYear, StudentSubject.ReportSession, StudentSubject.Criteria1Grade, StudentSubject.Criteria2Grade, StudentSubject.Criteria3Grade, StudentSubject.Criteria4Grade, StudentSubject.Criteria5Grade, StudentSubject.Criteria6Grade, StudentSubject.Criteria7Grade, StudentSubject.Criteria8Grade, StudentSubject.Criteria9Grade, StudentSubject.Criteria10Grade, StudentSubject.Comment
FROM (Students INNER JOIN StudentSubject ON Students.StudentID = StudentSubject.StudentID)
WHERE (StudentSubject.Subject = ?) AND (StudentSubject.ReportYear = ?) AND (Students.Grade = ?) AND (StudentSubject.ReportSession = ?)

The ? stem from combo box controls which I use to filter the results

So far so good!

However, when I try to update the data in just one of the tables, nothing happens, no error, just no update. The update statement I'm using is:

UPDATE StudentSubject SET GradeOverall = ?, Criteria1Grade = ?, Criteria8Grade = ?, Criteria7Grade = ?, Criteria6Grade = ?, Criteria5Grade = ?, Criteria4Grade = ?, Criteria3Grade = ?, Criteria2Grade = ?, Criteria

DD 3.5 sql-view and update with gridview - pk problem



Hello all.

Sql Dynamic data 3.5 - website

working with sql view map to the model..

I got a gridview problem with changing from edit mode to normal. The select is happened with LinqDatasource control and the update with "var" statement..   

The update dos happened but the gridview get an error saying .. that table don't have a primary key.. well . it's a view!! And I updated  the data not using the control. bla bla --- how can I override that?? Extend that??  


Update Panel Problem



on button click event i called server side code(enable page contorls) and then call javascript function using following code

protected void btnNewPayments_Click(object sender, EventArgs e)

protected void btnNewPayments_Click(object sender, EventArgs e)



ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "key", "return EnableDisable(true,false)", true);


all the server side code execute and JScript function call as well. But Page controls not enabled. I think this is update panel error.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend