.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

what is the use of RepositionMode in modalpopup

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

i want to know what is the use RepositionMode property of the modal popup control extender of ajax toolkit control,i know it is enum type what is i want is primary purpus .

View Complete Post

More Related Resource Links

Open ModalPopup dialog on page load


Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?

ModalPopup/UpdatePanel from codebehind, inconsistent behavior onClick


First post bear with me please:

I have a simple form with a list of linkbuttons, each fires the same onclick event which sets an indicator image.  I have a dummy button with style="display:none" which I have set as the TargetControlID of the modal.

onClick event from the imagebutton, the modal is shown via modal.Show().  The cancel button inside the modalpopup fires an event which turns off the indicator image and hides the modal via modal.Hide(). 

The events fire perfectly, it's very simple!  Although after doing some testing I noticed the modalpopup is not presented after the 6-10th cycle of clicking the open event, then clicking cancel.  The grey background appears but it is behind the main panel and the modal is either presented behind this or is just simply not displaying. 

I spent hours researching various methods, implemented the CancelControlID to see if it was somehow tied to my call of modal.Hide() that fails.

This occurs with an updatepanel only.  The behaviour is much cleaner this way, so I would hope to be able to implement this.  I have basically eliminated everything but these two events!  Please help

setting label using modalpopup selected value


Hi all:

I have a modalpopup control which has  a gridview and search criteria. User selects a records and clicks modalpopup ok button ( which is set as modalpopup's okbutton). I have attached an event to okbutton click event. and inside this event, I am setting a label control which in on main page which called this modalpopup. I debugged code, it comes inside that event but doesnt set value. below is my event code.

protected void btnOkCustomers_Click(object sender, EventArgs e)


Int32 CustomerID = Convert.ToInt32(GridView2.SelectedDataKey.Value);

orders = new Orders();

DataSet CustomersDs = orders.GetCustomerById(CustomerID);

lblCustomerName.Text = "sadasdad"; // CustomersDs.Tables[0].Rows[0]["first_name"].ToString();




Please suggest me solution to this.

Asif Hameed

modalpopup and javascript error object required

Hi!   I Have this error when click on a button to open a popup box in my page: "object required"   Here is my code:   <%@ Page Language="VB" MasterPageFile="~/artm.master" AutoEventWireup="false" CodeFile="artm_principal.aspx.vb" Inherits="artm_principal" title="Principal" Debug="true" MaintainScrollPositionOnPostback="true"%><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AJT" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">                                      <AJT:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></AJT:ToolkitScriptManager>                                        <AJT:ModalPopupExtender ID="ModalPopupExtender1" runat="server"         &

showing modalpopup and saving data to database simultaneously using ajaxtoolkit and javascript

hi,i have a button ,i want that when i click on that button the data should be saved in the database as well as at the same time a modal popup should display the customerid .i have written the code as <asp:button id="save1" runat="server" onclick="Button4_Click" style=""z-index:" mode="hold" xmlns:asp="#unknown" /> left: 740px; position: absolute; top: 304px" Text="save"/> <asp:panel id="panel" runat="server" xmlns:asp="#unknown">  /asp:Panel> <ajaxtoolkit:modalpopupextender id="MPE" runat="server" targetcontrolid="save1" xmlns:ajaxtoolkit="#unknown"> PopupControlID="panel" DropShadow="true" BackgroundCssClass="modalBackground/> protected void Button4_Click(object sender, EventArgs e) { string id = TextBox1.Text; string name = TextBox2.Text; string cn = "Data Source=hcl;Initial Catalog=mydata;Integrated Security=True"; SqlConnection con = new SqlConnection(cn); SqlCommand cmd = new SqlCommand("insert into customer values (@id,@name)", con); con.Open(); cmd.CommandType = CommandType.Text; cmd.Parameters.Add("@id", id); cmd.Parameters.Add("@name",name); cmd.ExecuteNonQuery(); con.Close(); CUSTID.Text = id.ToString(); MPE.Show(); }

How do I stop ModalPopup from closing

I have a simple example of a ModalPopup with a panel that appears in the center of the ModalPopup and a couple of buttons in that panel. One of the buttons is a cancel and the other is an OK button. No matter how many other buttons that I add each one closes the ModalPopup. I need to keep the ModalPopup open so that I can run a few calculations then click a close button.  Any help is appreciated.

Asp AJax ModalPopup Problems

HI, I am invoking a modal formview popup for edit and insert on a gridview selection. When the edit button is first clicked, the popup shows up and on subsequent click it gives errors like    Microsoft JScript Error:Sys.InvalidOperationException:Two Components with the same id.    ctl100_ContentPlaceHolder1_ucopsphone11_mdlPopupPhone cannot be added to the application. The ucopsphone11 is a grid user control within which I placed a modal formview. 1. How to make the modal popup work properly. 2. The update/cancel/command should be inside the popup formview or outside of the modal popup. 3. In the modalPopup usercontrol page_load event I was trying to set default mode. But it fires only once because     of (Not PostBack) during the page load. But when modalPopup is shown it is not fired.      I want to the use same modalPopup for edits/insert.   I have been struggling with this for more than a day. I would appreciate if someone help me move forward with this. Thanks Suresh   Grid View Page protected void GridViewAppPhone_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = GridViewAppPhone.SelectedRow; int index = GridViewAppPhone.SelectedIndex; strkey1 = GridViewAppPhone.DataKeys[rows.RowIndex["id"].ToString() Session["papp_id"] = strkey

display modalpopup after clicking the linkbutton in grdview with the data based on bound vale

Hi I have gridview with link button as itemtemplate.i want to display the modalpopup after clicking the linkbutton in the gridview.This modalpopup should dispaly some data based on the value associate with the linkbutton.Please helo me. 

Ajax Control Toolkit - ModalPopup displaying behind Flash

HiI have a flash on my page and I need to popup an ajax window, I use ModalPopupExtender. The problem is that ajax popup window always shows behind the flash in Internet explorer and Google Chrome. In firefox there are no such problem.I tried to set wmode="transparent" but id didn't help.Thanks

Make Ajax CalendarExtender always visible on a modalpopup

Hi There,Using a modalpopupextender a panel having controls is poped-up as a modalpopup. The problem I am facing is how to make the Ajax Calendar always  visible on the modalpopup.Functionality of controls on modal popup:1. A calendar (use of Calendarextendar preferred) and a ListBox placed side by side. 2. calendar's behavior need to be exactly the same as that acheived using a Ajax Calendarextendar3. The Calendar is always visible. 4. The days selected by user are appended to the ListBox (with no repeatition)How to meet the above conditions? Any help will be gratefully acknowledged.

ModalPopUp not rendering properly

Hey  folks, Quick Question. Whenever you have  something like this: MsgBox("Message before page load") Response.Redirect("xyz.aspx") The message box pops up and when you click ok in messagebox then you get redirected to xyz page. I am using Ajaxmodalpopupexntender instead of Message box which loads a UserControl into it.  After the popup I have response.redirect. Now, my modalpop doesn't render on to the screen before redirect, waiting for Ok button to be clicked and then get redirected. It directly gets redirected to the xyz page without loading the popup. Please tell me how do I stop this modalpop before page gets redirected.   Thanks

ModalPopup containing a Wizard

Hi All, I have wizard control inside a Modal Popup initiated on a button click. The trouble is the next/previous buttons close the popup. Is there any way to prevent this from happening? Code below.   Thanks.<%@ Page Language="C#" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void btnStart_Click(object sender, EventArgs e) { ModalPopupExtender1.Show(); } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Popup Wizard</title> </head> <body> <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" /> <asp:Button ID="btnHidden" runat="server" Text="Button" style="display: none"/> <asp:panel runat="server" ID="Panel1"> <div style="width: 20em; height: 15em; border: 2px solid black; background-color "> <asp:UpdatePanel ID="UpdatePanel1&

Autocomplete + Modalpopup + gridview

HI,this is the behaviour i'd like to have :1) The user enters some char in a textbox 2) the autocompleteextender opens a modalpopup with a gridview inside showing all record matching the word entered3) the user select an item in the gridview4) the popup hides and the field on the form are filled with the data read from the gridviewIs there an easy way to achieve that?I'm using vs2005, and have no much experience with ajax.Thanks. 

not able to access dropdown value inside modalpopup


Modal popup is inside the update panel. I have a dropdown control inside modal popup. When i select the data in the dropdown and click ok on the modal popup it always shows the dropdown selectedvalue as first index no matter what i select . I am not able to find the solution for this.


Thanks in advance


how to get value from griview to modalpopup extender


i have a grid view and on clik of link byutton i open moral extender...now how can i pass the value from grid to moral extender.

i have checked few links here but that dint give me much idea...please suggest me on some code..thanks

 <asp:GridView ID="Gridgpapp"  runat="server" DataSourceID="ApprovalGp" AutoGenerateColumns="False" 
            AllowPaging="True" AllowSorting="True" BorderColor="#3366CC" BackColor="White" BorderStyle="None" 
            BorderWidth="2px" CellPadding="4" ShowFooter="True" EmptyDataText = "No Gatepass waiting for Approvals">
              <RowStyle BackColor="White" ForeColor="#003399" />
                   <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                   <PagerStyle BackColor="#99CCCC"  HorizontalAlign="Left" />
                   <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                   <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                  <asp:BoundField DataField="passno&q

show modalpopup extender in radio button click.



I have a radio button list and it is populating data from database.

I want to show a modal popup extender when someone clicks a specific value in the radio button list.

For example:

display the modal popup when radiobuttonlist.value=="13".

is this possible??

modalpopup inside gridview.


Hi All;
I have a gridview inside update panel. gridview has a template column with linkbutton and modalpopup like this:
   <asp:LinkButton ID="lkProducts" runat="server" Text="Edit" CommandName="Select"></asp:LinkButton>
   <asp:ModalPopupExtender ID="gv_ModalPopupExtender" runat="server" TargetControlID="lkProducts"
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