Showing posts with label modalpopupextender. Show all posts
Showing posts with label modalpopupextender. Show all posts

Wednesday, March 28, 2012

Modal Popup Extender and Iframe

Hi @dotnet.itags.org.all, misters

I would like to show a ModalPopupExtender in my page. I have an iframe in the page that shows an PDF file.

The trouble for me, when ModalPopup is shown the iframe appears above it and I cannot see contents of Modal Popup (only dropdownlist appears above)

Thanks in advance for any help. I have lastest version of Ajax Toolkit.

Greetings

I dont Quite have the same problem but it does involve the modal popup extender and i have an IFrame. I would like to display te modal popup in the parent of the IFrame. In other words when clicking on the link in the IFrame the popup should cover the whole screen not just the Iframe. I would also then need to select a value from the popup and pass it back to the Iframe. Is this possible anyone, its killing me. While im at another problem im having is that i have the ajax slider control inside a scrolling DIV but when that DIV is scrolled the ajax slider moves with the scroll instead of just staying wher it belongs. Help me please


I have exactly the same problem, the PDF object is covering my ModalPopup, I tried setting the modalpopu z-index higher than the iframe, but that didn't work, have anyone a working solution?Thanks!WL

Modal Popup Extender

hi

i have used ModalPopupExtender on my web page and it is really good but the problem is if i click any button then it close the panel.

is it possible to use some validation control on the panel like i want to insert data into database, also i want to add a close button on the panel, without click close button that panel will be enable on the page.

thanks is advance

You can add a UpdatePanel in your panel, and put your detailviews in this UpdatePanel.

All the behavior you do in the UpdatePanel will not effect other controls that out side of this Panel.

Modal Popup extender doesnt work (fast enough?) if used in a user control?

I created a user web control containing a blue panel which will pop up when user clicks on a text box. I use Modalpopupextender for this purpose. It is very simple!

When I reuse this control in a page, the blue panel shows up for a fraction when the page is loaded. This is very annoying cause I basically can't create my own modal dialog box and reuse for different pages. Is this a bug in the toolkit or do I need to add something to my control?

Thanks

MY CONTROL:

<%@dotnet.itags.org.ControlLanguage="C#"AutoEventWireup="true"CodeFile="TestPopUpBox.ascx.cs"Inherits="Admin_Configuration_TestPopUpBox" %>

<%@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>

<asp:PanelID="Panel1"runat="server"BackColor="Blue"Height="235px"Style="position: relative"

Width="556px"><asp:TextBoxID="TextBox1"runat="server"Style="position: relative"></asp:TextBox>

</asp:Panel>

PAGE:

<%@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="Test.aspx.cs"Inherits="Admin_Configuration_Test" %>

<%@dotnet.itags.org.RegisterSrc="AddDeviceControl.ascx"TagName="AddDeviceControl"TagPrefix="uc1" %>

<%@dotnet.itags.org.RegisterSrc="TestPopUpBox.ascx"TagName="TestPopUpBox"TagPrefix="uc2" %>

<%@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>Untitled Page</title>

</head>

<body>

<formid="form1"runat="server">

<div>

<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

This is the page<br/>

<uc2:TestPopUpBoxID="TestPopUpBox1"runat="server"/>

</div>

</form>

</body>

</html>

<cc1:ModalPopupExtenderID="ModalPopupExtender1"runat="server"TargetControlID="TextBox1"PopupControlID="Panel1">

</cc1:ModalPopupExtender>

I found another post which solves my problem.

You have to add "display:none" attribute to the panel style. I guess the code in AJAX control takes some time to iterate through all the controls on the page to find and hide the target panel.

Modal Popup Extender and validation

Hi All,

I have a page utilising the ModalPopupExtender and was hoping that someone could give me some guidance as to how I can get, if it is possible, the client side validation to fire before the ModalExtender does?

I.e. I would like the Modal Popup to only display if validation passes.

Any thoughts would be greatly appreciated

Pete

Is there a way to set the event firing order or a dependecy for an ajax event event? e.g. before you do B you must successfully do A first.

Surely the validation rules must be honoured?


I just answered a very similar question:http://forums.asp.net/ShowPost.aspx?PostID=1505722

Hi

The above link no longer works - any chance of reposting the solution to this please?

Thanks

Ben

Modal Popup Extender and OkControID

Hello misters,

I have a page ASPX with ModalPopupExtender control, with the following properties:

TargetControlID="btnAnyadirObs"
PopupControlID="Panel1"


OkControlID="btnAnyadirObsAceptar"
CancelControlID="btnAnyadirObsCancel"
OnOkScript="onYes()"
OnCancelScript="onCancel()"

I have a Panel (Panel1) with two buttons: btnAnyadirObsAceptar and btnAnyadirObsCancel.

The buttons have Click event (code-behind .cs).

My trouble is that it is not execute Click event for button btnAnyadirObsAceptar (the OkControlID). I want to press the button OK in modal popup extender and I call Click event (server event of code-behind, file .cs).

Only execute onYes function javascript but it fails because typeof(Sys.WebForms.PostBackAction) == "undefined"

For javascript function onCancel() , $("Label1") fails.

See all code below, please.


The code begins here:

<asp:Label ID="Label1" runat="server" />

... more code...

<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"

TargetControlID="btnAnyadirObs"
PopupControlID="Panel1"
OkControlID="btnAnyadirObsAceptar"
CancelControlID="btnAnyadirObsCancel"
OnOkScript="onYes()"
OnCancelScript="onCancel()"

DropShadow="true" PopupDragHandleControlID="Panel3">
</cc1:ModalPopupExtender>

<asp:Panel ID="Panel1" runat="server" Style="display: none">

<asp:Panel ID="Panel3" runat="server"><div>TITLE</div></asp:Panel>


<filtros:EmbeddedUserControlLoader ID="UCObservacionesPopup" runat="server" AssemblyName="TareaRetenida.UC"
ControlClassName="UCRetenidaCentrolControlObservacionesPopup" ControlNamespace="TareaRetenida.UC" />


<controles:Boton ID="btnAnyadirObsAceptar" runat="server" CausesValidation="false" Text="Resx OK" OnClick="btnAnyadirObsAceptar_Click" />

<controles:Boton ID="btnAnyadirObsCancel" runat="server" CausesValidation="false" Text="Resx Cancel" OnClick="btnAnyadirObsCancel_Click" />


</asp:Panel>

The javascript functions:

function onYes()

{

var idBoton= "MY CLIENTID OF BUTTON OK";
if (typeof(Sys.WebForms.PostBackAction) != "undefined")
{
var postBack = new Sys.WebForms.PostBackAction();
postBack.set_target(idBoton);
postBack.set_eventArgument('');
postBack.performAction();
}

}

function onCancel()
{
//no postback necessary
try
{
$('Label1').innerText = 'Action canceled';
}
catch(err)
{
alert('onCancel' + "Error " + err.description);
}
}

Thanks in advanced, greetings regards

Hi,

you need to clear the OKControlID property otherwise the postback won't be propagated to the server.

Grz, Kris.


I am having the same issue. I cleared the OKControlID and now my js is not running? Is there something else I need to do?

Hi Alice,

myNameIsAlice:

I cleared the OKControlID and now my js is not running?

which js isn't running? Know that clearing the OKControlID just makes it a normal postbacking control again.

Grz, Kris.

Monday, March 26, 2012

Modal Popup In A Repeater

Hi,

Is there a way to use the ModalPopupExtender from inside a repeater -- each item would have a "delete" link button, and on clicking this, the Panel should be shown? Ive tried everything I can think of, but am not getting anywhere.

Thanks

Joe

Hmmm, I have seen modalpopupextender in the repeater before and it worked fine. Do you get any javascript errors, run-time errors about the extender setup, and how are you wiring the extender to the actual button that will cause the pop up to appear?


The ToolkitTests\Manual\DataboundDynamicPopulate.aspx file that comes with the Toolkit includes a ModalPopup in a repeater (DataList).


Thanks for the heads up. Between this and another article I found (sorry, cant find it right now to give credit), I came up with the solution I was looking for.

My solution is here (for my future reference): http://blog.joelowrance.com/archive/2007/07/10/ajax-modalpopupextender-in-a-repeater.aspx


Modal popup isnt visible

I have a panel and a modalpopupextender on my page. Everything is very simple and exactly like the examples I've seen. The problem is that if I set the display attribute of the panel to "none" - as all the examples show - the panel isn't visible when it's popped up. The main page greys out and is inactive but I can't see the popup panel. If I remove the "display: none" from the panel stylesheet then everything works perfectly except that the panel is briefly visible when the page first renders. It instantly disappears but causes the page to flicker.

I'm not using a master page and I have ajax toolkit 1.0.10301.1

Any ideas?

Could you post a small, self-sufficient repro that demonstrates your problem? It seems like it should just work from what you are describing.
Here is the stylesheet 
.ReImportPanel{/*visibility:<span class='val'> hidden</span>;*/ font-size:small; border-width:medium; border-color:#3C6B34; border-style:solid; border-width:medium; width:500px; background-color: #ebebdf;}.modalBackground{ background-color:Silver; filter:alpha(opacity=70); opacity:0.7;}
 
Here is the page
 
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" Y=100 DropShadow="true" PopupControlID="pnlReimport" OkControlID="btnClosePopup" CancelControlID="btnClosePopup" BackgroundCssClass="modalBackground" TargetControlID="Button1"> </cc1:ModalPopupExtender> <asp:Panel ID="pnlReimport" runat="server" CssClass="ReImportPanel" Width="500px" HorizontalAlign="Center"> <h3> Popup Dialog</h3> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <br /> <br /> <asp:Button ID="btnClosePopup" runat="server" Text="Close" /> </asp:Panel> <asp:Button ID="Button1" runat="server" CausesValidation="False" Text="Show Popup" /> </div> </form> </body></html>

Here is the stylesheet 
.ReImportPanel{/*visibility:hidden*/ font-size:small; border-width:medium; border-color:#3C6B34; border-style:solid; border-width:medium; width:500px; background-color: #ebebdf;}.modalBackground{ background-color:Silver; filter:alpha(opacity=70); opacity:0.7;}
 
Here is the page
 
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" Y=100 DropShadow="true" PopupControlID="pnlReimport" OkControlID="btnClosePopup" CancelControlID="btnClosePopup" BackgroundCssClass="modalBackground" TargetControlID="Button1"> </cc1:ModalPopupExtender> <asp:Panel ID="pnlReimport" runat="server" CssClass="ReImportPanel" Width="500px" HorizontalAlign="Center"> <h3> Popup Dialog</h3> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <br /> <br /> <asp:Button ID="btnClosePopup" runat="server" Text="Close" /> </asp:Panel> <asp:Button ID="Button1" runat="server" CausesValidation="False" Text="Show Popup" /> </div> </form> </body></html>

Modal PopUp problem

Hi guys, my name is steven.i have a problem with modalpopupextender.

i have a linkbutton as the targetcontrolid.

the modalpopupextender runs perfectly as i click the linkbutton, but the code inside linkbutton_click was not executed.

my question is how can i execute the code inside linkbutton_click?

thanx for the sharing.

That is because the ModalPopup prevents the default event so no other handlers will be called. If you would like code to execute before or after the modalpopup window is shown you can hook into the 'showing' or 'shown' events. Here is alink to a postthat shows how to do that.

_onShow :function(e) {

/// <summary>

/// Handler for the target's click event/// </summary>/// <param name="e" type="Sys.UI.DomEvent">/// Event info/// </param>if (!this.get_element().disabled) {this.show();

e.preventDefault();

returnfalse;

}

},


mmm i kinda confuse...

here what i want to do, i have a linkbutton as the targetcontrolid from modalpopupextender.

the popupcontrolid is panel1. inside panel1 there is a detailsview in readonly mode.

when i click the linkbutton i want the popup show and the detailsview is in insert mode.

can you tell me how?

thanx so much.

Saturday, March 24, 2012

Modal popup TargetControlID set to a control from within a DataGrid?

Can someone please tell me how to set the ModalPopupExtender TargetControlID property to an ImageButton control that is part of a template column of a DataGrid? The designer doesn't allow me to set it to the required control, and when I set it in the .aspx source I get a run-time error.

Thanks...

Hi,

Would you please post some code,so I can reproduce the problem and resolve it more quickly?

Thanks


A bit too much code to post. I have an ImageButton inside an DataGrid template column. The DataGrid is in a table. Outside the table I have a Panel and ModalPopupExtender, but I can't set it's TargetControlID to the ImageButton. I can set it to other ImageButtons in the table.

Modal Poupup Extender and scrollhandler

From reading the release notes on codeplex, I was under the assumption that the latest version of modalpopupextender has a property called scrollHandler that can be set to false. I cannot find this property in the binary or the source code on 1.0618.

Thanks for all your help,

Steve

Hi Steve,

I got the same conclusion that this property doesn't exist after I took a look at its source code. You maycreate an issue for such inconsistency. Thank you.

Wednesday, March 21, 2012

ModalPopup - closing after every click event (need help)

My ModalPopupExtender show a Panel with GridView, TextBox - txtSearchParam, Button - btnSearch and of course also OkButton - btnOK and CancelButton- btnCancel. What I wannt to do is this:

1) in that gridview is displayed simple list of customers

2) user cann type in txtSearchParam some name and with click on btnSearch performs a SEARCH for typed name

Every time when user clicks on SEARCH BUTTON (btnSearch) my ModalPopup will be closed. It seems like ModalPopup ignores both settings for OKControlID = "btnOK" and CancelControlID="btnCancel".

Why is that ModalPopup closed after every Click in panel with gridView ?


What am I doing wrong ? Please help and sorry for my english :-)

Because btnSearch is posting back, I think that is the reason.

I also faced the same problem, upon google, i found that I have to use updatepanel and keep the btnSearch inside updatepanel's content.

It solved the problem, I can get the results wih different search criteria... but after that If I click cancel it is messing my page's dropdown cotrols.

Any idea?


I am having the same problem. I've tried everything I can think of... putting the TargetControl inside an UpdatePanel, putting it outside an UpdatePanel... with no luck.

Here, specifically, is what I'm trying to do:

I have a Panel ( we'll call it "Panel1"). The panel contains an UpdatePanel. The Updatepanel contains a User Control that has text boxes, buttons... all sorts of things that perform postbacks. If this is on a page by itself, everything works just fine; the updatepanel performs the partial postbacks and everything works.

However, I need it to appear as if it were a highly interactive modal dialog box. So, I attached a ModalPopupExtender to "Panel1". It pops up just fine, but whenever any of the controls within my user control fire, the entire modal popup vanishes. It doesn't seem to matter that I set the OkButton and CancelButton properties to buttons that are not within my user control... in fact, I set them to "hidden" buttons that are on the outer page, outside of the whole Panel1 that I'm displaying modally.

Someone please help... I'm at my wits end trying to figure this out.


Thx champ ! That was it...it works OK with UPDATEPANEL :-)
Can you elaborate on how you got it working? I still cannot.

Hi RobertBeach,

Do you still need a sample code , let me know...


yes, sure...let's share it with us please :-)

Hi,

Make sure that popup panel's OkControlID and CancelControlID are outside the update panel. Postback buttons should be inside the update panel.

For Example:

<cc1:modalpopupextender id="mdlPopup" runat="server" targetcontrolid="btnDummy1" popupcontrolid="pnlPopup" backgroundcssclass="modalBackground" okcontrolid="OkButton1" dropshadow="true" popupdraghandlecontrolid="pnlHeaderPopup" /><%-- PopupP anel--%><asp:Panel ID="pnlPopup" runat="server" Style="display: none" CssClass="modalPopup" Width="500px"><%-- Popup Panel Header--%> <asp:Panel ID="pnlHeaderPopup" runat="server"><%-- OK Control ID--%> <asp:ImageButton ID="OkButton1" runat="server" BorderStyle="None" ImageAlign="AbsMiddle" ImageUrl="~/App_Images/close_icon.gif" /> </asp:Panel> <Ajax:UpdatePanel ID="upLeaveDetails" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:FormView ID="frmView" runat="server" DataSourceID="ds1" Width="100%"> <EditItemTemplate><%-- Buttons that postback--%> <asp:Button ID="btnUpdate" runat="server" CausesValidation="True" CommandName="Update" CssClass="btn" OnClick="btnUpdate_Click" Text="Update" /> <asp:Button ID="btnCancel" runat="server" CausesValidation="True" CommandName="Cancel" CssClass="btn" OnClick="btnCancel_Click" Text="Cancel" /> </EditItemTemplate> </asp:FormView> </ContentTemplate> </Ajax:UpdatePanel></asp:Panel>

For more information refer to:

http://blogs.technet.com/kirtid/archive/2007/05/03/using-updatepanels-with-modalpopups.aspx

Hope it helps.

Modalpopup - Web Service Call Failed

My web service works great when I call it outside of the modalpopupextender. However, I can't seem to access the asmx page at all when using the modalpopup dynamic properties. I keep receiving errors stating both "web service call failed: 12030" & "web service call failed: 500" randomly. What am I missing here? Any help you can lend to my problem would be greatly appreciated!

<ajaxToolkit:ToolkitScriptManagerID="ScriptManager1"runat="server">
<Services>
<asp:ServiceReferencepath="~/GetCity.asmx"/>
</Services>
</ajaxToolkit:ToolkitScriptManager>

<asp:GridViewID="GridView1"runat="server"DataKeyNames="FILENAME"AutoGenerateSelectButton="True">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:linkButtonID="hlnkOrders"runat="server">Selectlnk</asp:linkButton>
<ajaxToolkit:ModalPopupExtenderID="ModalPopupExtender3"runat="server"
OKControlID="btnOK"
PopupControlID="Panel3"
TargetControlID="hlnkOrders"
DynamicServicePath="GetCity.asmx"
DynamicServiceMethod="LookupCityCode"
DynamicControlID="lblhidden"
DynamicContextKey='<%=eval("FILENAME") %>'
BackgroundCssClass="modal"
DropShadow="true">
</ajaxToolkit:ModalPopupExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<AlternatingRowStyleBackColor="#FFFFC0"BorderColor="#004000"BorderWidth="1px"/>
</asp:GridView>

<asp:Panelrunat="server"ID="Panel3"BackColor="AliceBlue">
<asp:LabelID="lblHidden"runat="server"></asp:Label><br/><br/>
<asp:Buttonrunat="server"ID="btnOK"Text="OK"/>
</asp:Panel>

Imports System.Web.Script.Services.ScriptServiceAttribute
Imports System.Web.Script.Services.ScriptMethodAttribute

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
PublicClass GetCity

Inherits System.Web.Services.WebService

Private strUserNameAsString =""
Private strServerNameAsString =""
Private strPasswordAsString =""
Private wAttachmentPathAsString =""

<WebMethod()> _
PublicFunction LookupCityCode(ByVal contextKeyAsString)AsString

'do some stuff
ReadExcelOrder(wattachmentPath & contextKey)
LoadParameters()

End Function

PrivateFunction ReadExcelOrder(ByVal FileNameAsString)AsString

'do some stuff

End Function

PrivateSub LoadParameters()

'do some stuff

End Sub

I'll answer my own question here. Once I added the property System.Web.Script.Services.ScriptService to the webservice, it works!

<WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Script.Services.ScriptService()> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
PublicClass GetCity


Even after adding


[System.Web.Script.Services.ScriptService]


 to my service it is not working. Please help

ModalPopup add rows to datagrid

I am trying to have a ModalPopupExtender when a button is clicked on the main page. On the popup, a user can enter a couple of peices of information and click the add button. I have that part working, but I am trying to make it more dynamic. Does anyone know how to make it so:

1) The popup doesn't disppear after clicking the add button, so the user can add more than one row without having to click the button on the main page

2) The datagrid is updated withwout postback

I have tried using the UpdatePanel, but I keep geeting an error message: An extender can't be in a different UpdatePanel than the control it extends.

Here is my code from the page:

<asp:ScriptManagerID="ScriptManager1"runat="server">

</asp:ScriptManager>

<table><tr><td><asp:ButtonID="ButtonAddItem"runat="server"Text="Button"/></td></tr>

<tr><td>

<asp:DataGridID="DataGridTemplate"runat="server"AutoGenerateColumns=falseDataKeyField="ItemID"BorderStyle=NoneBorderWidth=0>

<Columns>

<asp:BoundColumnDataField="ItemDescr"></asp:BoundColumn>

<asp:BoundColumnDataField="TimeFrame"></asp:BoundColumn>

</Columns>

</asp:DataGrid>

</td></tr></table>

<asp:PanelID="PanelAddTemplateItem"runat="server"style="display:none;"CssClass="modalPopup">

<table>

<tr><tdcolspan=2>Add Line Item</td></tr>

<tr><td>Line Item:</td><td><asp:TextBoxID="TextBoxAddTemplate"runat="server"TextMode=MultiLine></asp:TextBox></td></tr>

<tr><td>Time Frame:</td><td><asp:TextBoxID="TextBoxAddTemplateTime"runat="server"></asp:TextBox></td></tr>

<tr><tdcolspan=2><asp:LabelID="LabelAddTemplate"runat="server"></asp:Label></td></tr>

<tr><td><asp:ButtonID="ButtonAddTemplate"runat="server"Text="Add"/></td><td><asp:ButtonID="ButtonAddTemplateOK"runat=serverText="finished"/></td></tr>

</table>

</asp:Panel>

<ajaxToolkit:ModalPopupExtenderID="ModalPopupExtenderAddTemplateLine"runat="server"TargetControlID="ButtonAddItem"PopupControlID="PanelAddTemplateItem"CancelControlID="ButtonAddTemplateOK"BackgroundCssClass="modalBackground"DropShadow=true>

</ajaxToolkit:ModalPopupExtender>

I was able to figure out my first problem by putting the updatepanel inside the asp:panel that the modalpopupextender displays. However, I still cannot seem to figure out how to update the datagrid. Is it possible to update the grid on-screen without a postback? Thanks!


Hi Briancostea,

I think you should add another UpdatePanel to your page and remove the DataGrid into the newly added UpdatePanel.So now there are two UpdatePanels. When we add new records, one UpdatePanel will be postback and add data to Database or somewhere else and next the another UpdatePanel will be refreshed. To refresh the UpdatePanel's content , please use add these code to your page.

 <script type="text/javascript" language="javascript"> var eventButton; Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function BeginRequestHandler(sender, args){ eventButton=args.get_postBackElement().id } function EndRequestHandler(sender, args){ if(eventButton =="Button1" ){ //refresh UpdatePanel2 by using __doPostBack() state. } } </script>

I hope this help.

Best regards,

Jonathan