.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

How to pass paramters to Jquery modal window

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net

Hi I have a webpart in a page in which there is a gridview(which shows list of customers). When I click on a link button in gridview, I would like to popup a JQuery modal window and fill the popup(this contains textboxes, then a gridview which contains mapped systems for thet customer, and another gridview which contains list of configured reports for that customer) with the details based on the customer name(link) clicked. Here I need to pass the customer Id and customer name parameters based on which I can fill the Jquery modal window.

Can any one have an idea to pass parameters to JQuery modal window in order to fill the contents inside it?

View Complete Post

More Related Resource Links

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

Pass a grid column value to a Modal


Hi, I have a requirement to hide a field called details on a gridview and show it in a jQuery modal dialog when users click on the Customer ID hyperlink. This grid is created programmatically. I will be hiding the details column via the CSS display:none property. Does some one know how can I pass the grid's selected hidden column value to the modal? Here is some of the code I started:

            GridView mygrid = new GridView();
            //.....................................More columns code for the grid

            //Here is where I need to pass the Details column value associated with the customer ID field selected to the Modal and open the Modal dialog.            
            HyperLinkField linkField = new HyperLinkField();
            string[] dataNavigateUrlFields = { "CustomerID" };
            linkField.DataTextField = "CustomerID";

Closing Javascript Modal dialog window after server side event processing


Hello Friends..

Please tell me how to close Javascript ModelDoalog Window.. after Server Side event Processing .

Basically i want close window in  finally Block After sucessfulll Updation.

AMit..... InnocentInnocentInnocentInnocentInnocentInnocentInnocent

Refreshing a Jquery modal dialog after closing another Jquery modal dialog


I have one aspx page which contains a webpart. The structure of the webpart is:

Webpart(holds one user control say UC1)

      UC1-> contains another user control say (UC2) in a <div>, which I am going to show as a popup on clicking of a link button inside a gridview in UC1.

      UC2-> contain another user control say (UC3) in a <div>, which I am going to show as a popup on clicking of a button inside in UC2.

That means -> UC1(main page) ------->(Onclick) One JQuery popup(UC2)--------------->(OnClick) One Jquery popup(UC3) here UC2 is still remaining in focus and UC3 will be another Jquery popup on UC2.

Now my requirement is when i fill the Jquery popup(UC3) and click on save button in UC3, I would like to close UC3 Jquery popup and refresh the gridview inside UC2 Jquery popup without closing it.

Is this possible?(please explain the logic if found in terms of Jquery, but not in terms of normal popup windows)

How to Pass UserName & Password to codebehind page using jquery

here is login form I would like to use.
Right now it is not communicating with my codebehind page.
How do I modify the jquery  login code to post the username and password to the codebehind?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default2" %>

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

<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="styles/chop1.css" />
<script type="text/javascript" src="js/chopjs/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="js/chopjs/three.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="js/ie_png_fix.js"></script>

modal window in asp.net

Hi! i have popup windows which are opened using window.open() property. Now, i want them to work them as a modal box. I should have OK and CANCEL button on the popup windows where the OK button passes the selection of the listitems of that modal window to the paret page and itself is closed. The CANCEL button should close the modal box  without passing any value to the parent page. How do i do it plz?

WPF Window as Modal Dialog, strange behavior

Hopefully someone has a clue.... My application displays WPF Window as a modal dialog box. The dialog box has a few child user controls, one of which has combo box. When the user clicks this combo box to select... the whole dialog disappears except of the innards of the combo box. So the user only sees the list box of the combo box. Here are the details I got from the  client: The window itself is launched from non WPF application (Lotus Notes). This happens only on a few machines. The OS is Windows XP SP3. There is no issue with the parent handle, windows owner, etc... I've seen this behavior during the development phase, only when running under a debugger.    Thanks, Michael        

Datalist and Ajax control toolkit Modal Popup window

Hi friends I have created list of thumbnail images in datalist and on clicking image i want to pass image name to Ajax control toolkit Modal Popup window which display bigger image.   Please help me.

Does the ReportViewer control print button work inside of a modal MSIE window?

I am getting the following two error messages when using the new ReportViewer v10 control after pressing the toolbar print button. I am only seeing this error inside of a modal popup window in MSIE. The print button in a normal popup window doesn't have this error. An error occurred trying to get the current window Error: Could not complete the operation due to error 8007f305. If anyone knows of a quick fix, please let me know. Thank you. VS2010, MSIE 8, SQL Server 2008.

How to prevent collapsible panel from closing modal window

I have a collapsible panel extender inside a modal window, my problem is that whenever I click on the link button (to expand my panel), the window closes. Does anyone know of a way to avoid this?

Retain previous selection in a modal window when it is reopened within same session

Hi ! I have a modal which have a listbox inside it. I am passing the values through a session to the parent page. Suppose, i made few selections on the modal page and i closed it. I want to see the same selection on the modal page once i reopen the modal window Is there any possibility to retain the previous selection in a modal window? I used <body onload="window.focus();" onblur ="this.focus" > but this doesn't work Any idea please?  

Modal Window won't close

I have a linkbutton at the end of each record of a gridview that has a client side javascript invoked on the OnClientClick event. It displays a popup modal window. This is applied to each record in the gridview databound event. lnkbtnAppts.OnClientClick = String.Format("javascript:window.showModalDialog('CAPAC_Appointments_Modal.aspx?Client_Name={0}&Client_SR={1}','','dialogWidth:800px; dialogHeight:600px; center:yes');", Client_Name, Row_SR) On the modal window, I have a standard server side button, with attributes applied to run a client side javascript to close the popup window. Seems fair enough! btnClose.Attributes.Add("onclick", "javascript:window.top.close()") The problem is it closes the window, but the popup immediately appears again. The second time I can close the popup window? Not good! Thanks    

reCaptcha+jquery ui modal dialog

Hi, I would like to have a contact form which contains a reCaptcha, and have that form inside a jquery ui modal dialog. All works well, except that I have a submit button for the form - which closes the modal dialog wether the recaptcha is valid or invalid. I tried adding onClientClick="return false;" to the submit button, but it still posts back, and closes the dialog. how do I remain inside the dialog ?

how to open a subform model Form,Sub Window form using jquery that save the data ajex

how to open a subform model Form,Sub Window  form using jquery that save the data ajex

Need help in getting caller id of modal popup with jquery



I have a modal popup built in jquery. I have an apx which has several ascx controls. Each of the ascx control has a button calling the modalpopup.  I need to know the id of the calling control so I can handle it differently.

Any help would be appreciated.


javascript window.history.back() issue with Modal popup extender



I have a asp.net page that has a list of items. When one of the items from the list is clicked a details page is displayed. This details page has a link button to show a popup for history of the item. The details page also has a button with text 'Back'.  The back button has onclick event set to  "javascript:window.history.back();".

This back button works fine and goes back to the first page. However when the user is on the second page and opens the pop up by clicking on the link button, the back button stop working and displays Webpage has expired message.

Any help would be appreciated.




click a button to pop up new window to pass a value; is working on second click onwards


Hi all,


i am facing a problem to make a button onclick to pop up a new window with pass a value. it only working on second click on onwards.

i check the checkbox from a table then pass the ID for each data to another page.

below is my coding: hope anyone can help me. this is i add in button click; the PIID is a value i want to pass


 Protected Sub btn_download_in_excel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_download_in_excel.Click


        Dim keyID As String = ""
        Dim CheckedItems As SortedList = ViewState("CheckedItems")
        Dim ChkBxIndex As String = ""
        Dim strPsId As String = ""
        Dim PIID As String = ""
        Dim rows() As DataRow

        Dim CheckedItemsKeys As ICollection = CheckedItems.Keys
        Dim keys As IEnumerator = CheckedItemsKeys.GetEnumerator

        While keys.MoveNext
            If Not IsNothing(CheckedItems) Then
                ChkBxIndex = keys.Current
                keyID = ChkBxIndex

                rows = pLookupDataSet.Tables("CCL_TB_PART").Select("PIID = " & Cmn.QStr(keyID))

                If String.IsNullOrEmpty(PIID) Then
                    PIID = keyID
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