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

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

Button forces postback in updatepanel inside Popup

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
I have an update panel which is inside a Modal Popup Extender. When I click the Refresh Report button it always calls a postback. I need to stop it from posting back. Ideas?

View Complete Post

More Related Resource Links

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

Popup Confirm that forces user input for ok button

Hi Everyone, Does anyone know how to do a popup confirm that has a textbox where the user types in a comment.  Currently I am using just a confirm pop up.  What I really want to do is make is so the user cannot click on the ok button until there is something typed into the textbox but they can hit the cancel button at any time without providing a comment.  Any suggestions? Thanks! -Nici 

cannot bind dropdownlist inside from button click inside updatepanel



I have a gridview inside UpdatePanel. 

Inside gridview there is a dropdownlist and a button on each row. On button click I am opening a panel through Modal popup extneder.

Inside that pop up there is again a dropdownlist. I am adding an item into this dropdownlist based on the selection from the dropdown inside gridview. 

like  ddl.items.insert(0,'xyz');

But first time this inserted item is not getting reflected in the dropdownlist. But after one postback this item is getting reflected.

Please let me know how to fix this. I tried UpdateMode conditional and always but didn't worked. If I am not clear let me know.


Button not preserving ID after partial postback in updatepanel?


I've created a dynamic button from another control outside of the update Panel.  The button is given an ID and such.  When the button is click, a postback occurs and I've re-created this button during Page_Init, Page_PreLoad, and Page_Onload and NONE of them is preserving the value. 

The only way for me to find the control was to look at the Page.request.form's allkeys and compare the string with a any text string that contains: Button.  Because I ID'd teh button as: ButtonRow_0Col0.  But the actual ID is null.  However, when traversing through page.request.form, the allkeys shows that ID with no problem.

So how come the actual ID is lost after a partial postback yet, the page.request.form's allkeys can pull out its allkey's value??


asp:button Click event (inside a repeater) lost on postback.


 I have been writing C# code for about 3 years now and have never had this happen.

I am using an asp:repeater (inside an update panel):

<asp:Repeater runat="server" ID="rptRedFolderDocs" OnItemDataBound="rptDataBound">

inside the repeater I have a button with a click event with server side code.

When the page loads, the repeater is databound to a datatable popuplated from SQL connection.  The repeater is NOT bound on postback. I wanted the data to persist.

When the button is click

Crystal Report Export and Print button not working inside UpdatePanel



Iuse UpdatePanel for my pages, clients requested to view pages without flickering.

So, I put all component in update panel, but after that, export and printing for Crystal Reports stoped to work. If I put report viewer outside of updatepanel its working.

Have anyone this problem? There's some solution for this?

Thanks, Paul

can anyone help me please - validator in modal popup prevent my button from postback


i have a very strange problem

for some reasons
i m forced to use the following solution

i have a situation that includs
a validation control
inside a usercontrol
that is loaded on the page using a modalpopup
when i click a button from inside a gridview

the problem is that the button inside the modalpopup
never fire the server code behind
as if the validator prevent it from doing so

my example website is uploaded here


anybody help me please


Using ATLAS PopUp Control with Calendar inside the GridView Control

In this video tutorial Mohammad demonstrates how you can access the Calendar control which is displayed using the ATLAS PopUp control inside the GridView control.

Gridview inside updatepanel


I am displaying large amount of data in gridview,the gridview placed within updatepanel,every 1sec i am refreshing updatepanel using ajax timer.my problem is while displaying large data the cpu performance is low,pls give idea to increase cpu performance..

Modal Popup with UpdatePanel


Hi Guys,

              I have one Panel on ascx control to which I have attached one Modal popup extender. On this panel I have one RadioButtonList control which having SelectedIndexChanged on which I have made CheckBoxLists visible True/False. 

             I want to add Update panel to this Panel . So when I handled the SelectedIndexChanged event there should be no total page post back, only Panel updates should be happen.

 Please do reply..



UpdatePanel - UpdateProgress only displays on initial postback



I'm having a somewhat odd issue, I'll do my best to explain it.

In a nutshell I have an UpdatePanel with an UpdateProgress item, first postback checks for warnings, if there are any they will be be displayed to the user as a JavaScript 'confirm' box. If the user clicks OK the next postback occurs to commit the change.

The UpdateProgress loading notification appears on the first postback but not on the second, even though both of them function correctly.  The buttons that trigger both postbacks are async postback triggers in the update panel, and both are inside the ContentTemplate.

It's not a huge problem, but it causes some confusion, has anybody ever seen this issue before?


Validation Controls Inside UpdatePanel

Hi All,If you use validation control, the base validator will render script WebForm_OnSubmit() to the page and add form onsubmit "onsubmit="javascript:return WebForm_OnSubmit();". This script is used to fire client side validation event.Now I have a listview inside updatepanel, when click edit button to fire the listview edit mode, the above validation script is just not rendered. How shall I work around with that? I need to customize the client validation event here.Thanks.

Standard HTML button causes postback in FF?

Hello,     I'm doing some work with Javascript and I'm having an issue getting my site to work correctly in firefox.  I have the following button: <button id="myButton" onclick="SomeJavaScriptFunction('myParam')">Button</button> When I click on this button in IE7, it simply runs the javascript function and stops When I click on this button in FF, it causes a full page postback.  Why? Is there a good workaround for this issue? Thanks, Joshua Foulk

Problem with UpdatePanel postback

Hello,I have a Modal Popup window, inside an Update Panel object, that has the following layout:A Title areaA Content area with a tabstrip of 5 tabsA footer area with two buttons (Save and Cancel) and an UpdateProgressIn 3 of the five tabs I have:an UpdatePanel (UpdateMode=Conditional) that wrapsA collection of LinkButtons objectA gridviewAnother Panel object to be showed as a Nested Modal PopupNO update ProgressBoth the link collection and the gridview Select event will open the nested Modal window that contains a custom Usercontrol that is used to add new or edit object of the related gridview like in the code sample below//click handler of the LinkButton protected void btnNewPhone_Click(object sender, EventArgs e) { //Setup properties of the UserControl code omitted // ... //Show the nested Popup this.mpePopupPhone.Show(); } //handler for the gridview selectedIndex event protected void gvPhones_SelectedIndexChanged(object sender, EventArgs e) { //Setup properties of the UserControl code omitted // ... //Show the nested Popup this.mpePopupPhone.Show(); } Please note that: I am using the ModalPopupExtender show/hide behaviors using only server-side code. Also, the ModalPopupExtender objects for nested modal windows does not have the OkControlID & CancelControlID set. As the content of nested modal window is only a single user contro

How to get the combobox value inside Datagrid on Edit button click event

Hi     I have Datagrid template column like<DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn>DataGridTemplateColumn Header="Edit" x:Name="Edit" ><DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn.CellEditingTemplate></DataGridTemplateColumn>SelectionChanged="cmbDGTeam_SelectionChanged" IsTabStop="True" /></DataTemplate><ComboBox Height="22" IsEditable="True" IsReadOnly="True" ItemsSource="{Binding}" DisplayMemberPath="Title" SelectedValuePath="TeamID" x:Name="cmbDGTeam"  SelectedValue="{Binding Path=TeamID,Mode=TwoWay}"<DataGridTemplateColumn.CellEditingTemplate><DataTemplate><DataTemplate><TextBlock Text="{Binding Title}"/></DataTemplate></DataGridTemplateColumn.CellTemplate><DataGridTemplateColumn Header="Team" Width="75"><DataGridTemplateColumn.CellTemplate> and Edit button Template column <DataGridTemplateColumn Header="Edit" x:Name="Edit" > </DataGridTemplateColumn.CellTemplate></DataTemplate><Button Content="Edit" IsEnabled="False" x:Name="btnEdit" Click="btnEdit_Click" ></Button>&l

Looking to get the IsMouseOver of a button inside a header of an expander all though xaml

<Window x:Class="Testwpf.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <Expander x:Name="expan" IsExpanded="True" AllowDrop="True"> <Expander.Header> <Grid x:Name="grd"> <TextBlock Text="asdfhasodfjasdfj asjf aspd fk" HorizontalAlignment="Left" Margin="20,4,0,0"/> <Button x:Name="BtnHeaderGreen" Content="1" Width="25" HorizontalAlignment="Left"/> </Grid> </Expander.Header> <Expander.Content> <Grid > <Canvas Margin="0,2,0,0" x:Name="can" Panel.ZIndex="99"> <Canvas.Style> <Style TargetType="{x:Type Canvas}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Expander}}, Path=Header.IsMouseOver}" Value="true"> <Setter Property="Visibility" Value="Visible"/>

disable postback on a button

Hey guys, I'm pretty new to asp.net and having some troubles.   I have a button whose sole purpose is to set  div.visible = true There is a calendar control on my page and I need the selected date to remain selected after I hit this button. Right now if I hit the button it refreshes the whole page and sets the calendar's selected day back to date. today   Any ideas?  
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