<p>I have a gridview that is within an updatepanel for a modal popup I have on a page.<br>
The issue is that the entire page refreshes every time I click an imagebutton that is within my gridview. This causes my entire page to load and since I have grayed out the rest of the page so that the user cannot click on it this is very annoying.</p>

<p>Does any one know what I am missing.  </p>

<p><strong>Edit:</strong> I entered a better solution at the bottom</p>

[{'answer_id': 34875, 'author': 'Ben Scheirman', 'author_id': 3381, 'author_profile': 'https://Stackoverflow.com/users/3381', 'pm_score': 2, 'selected': False, 'text': '<p>do you have ChildrenAsTriggers="false" on the UpdatePanel?</p>\n\n<p>Are there any javascript errors on the page?</p>\n'}, {'answer_id': 35082, 'author': 'David Basarab', 'author_id': 2469, 'author_profile': 'https://Stackoverflow.com/users/2469', 'pm_score': 0, 'selected': False, 'text': '<p>Is the Modal Window popped up using the IE Modal window?  Or is it a DIV that you are showing?</p>\n\n<p>If it is an IE Modal Pop up you need to ensure you have </p>\n\n<pre><code>   &lt;base target="_self" /&gt; \n</code></pre>\n\n<p>To make sure the post back are to the modal page.</p>\n\n<p>If it is a DIV make sure you have your XHTML correct or it might not know what to update.</p>\n'}, {'answer_id': 35151, 'author': 'Compulsion', 'author_id': 3675, 'author_profile': 'https://Stackoverflow.com/users/3675', 'pm_score': 2, 'selected': False, 'text': '<p>Make sure you have the following set on the UpdatePanel:\nChildrenAsTriggers=false and UpdateMode=Conditional</p>\n'}, {'answer_id': 35189, 'author': 'Steven Williams', 'author_id': 3294, 'author_profile': 'https://Stackoverflow.com/users/3294', 'pm_score': 1, 'selected': False, 'text': '<p>Are you testing in Firefox or IE? We have a similar issue where the entire page refreshes in Firefox (but not IE). To get around it we use a hidden asp:button with the useSubmitBehavior="false" set.</p>\n\n<pre><code>&lt;asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" Style="display: none" UseSubmitBehavior="false" /&gt;\n</code></pre>\n'}, {'answer_id': 35229, 'author': 'Steven Williams', 'author_id': 3294, 'author_profile': 'https://Stackoverflow.com/users/3294', 'pm_score': 0, 'selected': False, 'text': "<p>I would leave the onClick and set it as the trigger for the updatePanel.</p>\n\n<p>That's odd that it works in FF and not IE. That is opposite from the behavior we experience.</p>\n"}, {'answer_id': 75388, 'author': 'Compulsion', 'author_id': 3675, 'author_profile': 'https://Stackoverflow.com/users/3675', 'pm_score': 0, 'selected': False, 'text': "<p>UpdatePanels can be sensitive to malformed HTML.  Do a View Source from your browser and run it through something like the W3C validator to look for anything weird (unclosed div or table being the usual suspects)</p>\n\n<p>If you use Firefox, there's a HTML validator Extension/AddOn available that works quite nicely.</p>\n"}, {'answer_id': 200777, 'author': 'bitsprint', 'author_id': 9948, 'author_profile': 'https://Stackoverflow.com/users/9948', 'pm_score': 2, 'selected': False, 'text': '<p>I had this problem and came across the following article:</p>\n\n<p><a href="http://bloggingabout.net/blogs/rick/archive/2008/04/02/linkbutton-inside-updatepanel-results-in-full-postback-updatepanel-not-triggered.aspx" rel="nofollow noreferrer">http://bloggingabout.net/blogs/rick/archive/2008/04/02/linkbutton-inside-updatepanel-results-in-full-postback-updatepanel-not-triggered.aspx</a></p>\n\n<p>My button wasn\'t dynamically created in the code like in this example, but when I checked the  code in the aspx sure enough it was missing an ID property. On adding the ID the postback became asynchronous and started to behave as expected.</p>\n\n<p>So, in summary, check your button has an ID!</p>\n'}, {'answer_id': 403473, 'author': 'Josh Mein', 'author_id': 2486, 'author_profile': 'https://Stackoverflow.com/users/2486', 'pm_score': 2, 'selected': True, 'text': '<p>Several months later this problem was fixed. The project I was working in was a previous v1.1 which was converted with 2.0. However, in the web.config this line remained:</p>\n\n<pre><code>&lt;xhtmlConformance mode="Legacy"/&gt;\n</code></pre>\n\n<p>When it was commented out all of the bugs that we seemed to have with the ajax control toolkit disappeared</p>\n'}, {'answer_id': 13273075, 'author': 'Scotty.NET', 'author_id': 1123275, 'author_profile': 'https://Stackoverflow.com/users/1123275', 'pm_score': 0, 'selected': False, 'text': '<p>For reference..</p>\n\n<p>I\'ve also noticed, when using the dreaded <code>&lt;asp:UpdatePanel ... /&gt;</code> and <code>&lt;asp:LinkButton ... /&gt;</code>, that as well as <code>UpdateMode="Conditional"</code> on the <code>UpdatePanel</code> the following other changes are required: </p>\n\n<ul>\n<li><code>ViewStateMode="Enabled"</code> is required on <code>&lt;asp:Content ... /&gt;</code> (I\'ve set it to <code>Disabled</code> in the <code>MasterPage</code>)</li>\n<li><code>ClientIDMode="Static"</code> had to be removed from <code>&lt;%@ Page ... /&gt;</code></li>\n</ul>\n'}, {'answer_id': 33972528, 'author': 'Bortus', 'author_id': 3968481, 'author_profile': 'https://Stackoverflow.com/users/3968481', 'pm_score': 0, 'selected': False, 'text': '<p>To prevent post-backs add return false to the onclick event.</p>\n\n<p>button.attribute.add("onclick","return false;");</p>\n\n<p><strong>Sample:</strong></p>\n\n<pre><code>string PopupURL = Common.GetAppPopupPath() + "Popups/StockChart.aspx?s=" + symbol;\nhlLargeChart.Attributes.Add("onclick", String.Format("ShowPopupStdControls(PCStockChartWindow,\'{0}\');return false;", PopupURL));\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/34798', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2486/']