Display Master-Detail Data with the ModalPopup Extender and GridView

Posted by: Suprotim Agarwal , on 10/9/2008, in Category ASP.NET AJAX
Views: 249306
Abstract: In the past we have often used the combination of the GridView and DetailsView to display Master-Detail data. Similarly, developers have used pop-ups to depict similar scenarios where a user clicks on a ‘master’ row and the details are displayed in a pop-up window. I was recently exploring the ModalPopup extender control which allows a page to display content to the user in a "modal" manner. I thought of trying out the Master-Details scenario using the ModalPopup Extender. This article discusses how to do so
Display Master-Detail Data with the ModalPopup Extender and GridView
 
In the past we have often used the combination of the GridView and DetailsView to display Master-Detail data. Similarly, developers have used pop-ups to depict similar scenarios where a user clicks on a ‘master’ row and the details are displayed in a pop-up window. I was recently exploring the ModalPopup extender control which allows a page to display content to the user in a "modal" manner. To explore the control, I thought of trying out the Master-Details scenario using the ModalPopup Extender. Here’s what we will do.
We will display an Order-Customer scenario using the ModalPopup extender. For demonstration purposes, we will be using the ‘Orders’ and ‘Customers’ table from the Northwind database. We will initially fetch and display data from the ‘Orders’ table in a GridView. The CustomerID will be a link which will enable the user to view details of the Customer using a ModalPopup Extender. The example focuses on exploring the capabilities of the ModalPopup Extender and hence less weightage has been given to ‘best practices of fetching data’ or realisitic usage of this control.
Note: I am using Visual Studio 2008 and thereby utilizing the ASP.NET AJAX plumbing that comes along with it.
Let us get started with a Step-by-Step approach to do so. Viewers who have prior experience in configuring the SqlDataSource, can jump directly to Step 5:
Step 1: Open VS 2008. Click File > New > Website. Choose ASP.NET Website from the list of installed template, choose target platform as .NET Framework 3.5, choose the desired language and enter the location where you would like to store the website on your FileSystem. I have created a folder called VS2008 Projects, so the location over here is C:\VS2008 Projects\ GridViewModalPopupExtender. After typing the location, click OK.
Step 2: Open Default.aspx. Switch to the Design mode of Default.aspx. Open the toolbox (Ctrl+Alt+X) > Data Tab > Drag and drop a SqlDataSource control on to the form. Click on the smart tag or right click SqlDataSource > Show Smart Tag > ‘Configure Data Source’ wizard. Click on ‘New Connection’ to open the ‘Add Connection’. Type your ‘Server Name’ and ‘Select a database Name’ to connect to. Over here, I have used (local) as the ‘ServerName’ and the database I am connecting to, is Northwind. Click on ‘Test Connection’ to make sure that there are no errors while connecting to the server. Click Ok.
Step 3: In your ‘Configure Data Source’, click ‘Next’. An option will be displayed to save the connection string to the configuration file. Select the checkbox ‘Yes, save this connection as:’, type a name for the connectionstring ‘NorthwindConnectionString’ and click Next.
Step 4: In the ‘Configure Select Statement’ > select ‘Specify Columns from Tables or Views’ radiobutton > Select ‘Orders’ table in the Name and choose OrderID, CustomerID, OrderDate and ShippedDate. Click Next > ‘Test Query’ to preview data > click Finish. The wizard adds a SqlDataSource control to the page as shown below.
 <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT [OrderID],[CustomerID],[OrderDate],[ShippedDate] FROM [Orders]"></asp:SqlDataSource>       
  
If you check your web.config, the connection string is added as shown below:
      <connectionStrings>
            <add name="NorthwindConnectionString" connectionString="Data Source=(local);Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClient"/>
      </connectionStrings>
 
Step 5: Add a <ScriptManager> control to the page and then an <UpdatePanel> from the toolbox. Drag and drop a GridView from the toolbox and place it inside the <UpdatePanel> and set its data source property to the 'SqlDataSource1' as shown below:
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
     <ContentTemplate>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"
AutoGenerateColumns="false" AllowPaging="true" >
           </asp:GridView>   
</ContentTemplate>
    </asp:UpdatePanel>  
   
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT [OrderID],[CustomerID],[OrderDate],[ShippedDate] FROM [Orders]"></asp:SqlDataSource>            
</form>
</body>
   
Step 6: We will now add columns to the GridView as shown below. Observe that the CustomerID is displayed as a link. We will display the CustomerDetails when the user clicks on the link.
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"
AutoGenerateColumns="false" AllowPaging="true" >       
<Columns>      
    <asp:BoundField HeaderText="OrderID" DataField="OrderID" />
     <asp:TemplateField HeaderText="CustomerID">
        <ItemTemplate>
                <asp:LinkButton runat="server" ID="lnkCustDetails" Text='<%# Eval("CustomerID") %>'  />
        </ItemTemplate>
    </asp:TemplateField>
    <asp:BoundField HeaderText="OrderDate" DataField="OrderDate" />
    <asp:BoundField HeaderText="ShippedDate" DataField="ShippedDate" />
</Columns>
</asp:GridView>
Step 7: We will now add a ModalPopup Extender below the GridView:
<asp:Button runat="server" ID="btnShowModalPopup" style="display:none"/>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
    TargetControlID="btnShowModalPopup"
    PopupControlID="divPopUp"
    BackgroundCssClass="popUpStyle"
    PopupDragHandleControlID="panelDragHandle"
    DropShadow="true"
    />
<br />
 
<div class="popUpStyle" id="divPopUp" style="display:none;">
    <asp:Panel runat="Server" ID="panelDragHandle" CssClass="drag">
        Hold here to Drag this Box
    </asp:Panel>
    <asp:Label runat="server" ID="lblText" Text="CustomerID: "></asp:Label>
    <asp:Label ID="lblCustValue" runat="server"></asp:Label>
    <asp:GridView ID="GridView2" runat="server">
    </asp:GridView>                         
    <asp:Button ID="btnClose" runat="server" Text="Close" />
   <br />
</div>       
The ModalPopup Extender has a number of properties that are as follows:
·         TargetControlID – The ID of the element that activates the modal popup; in our case it is the ‘btnShowModalPopup’
·         PopupControlID - The control that will be displayed as the modal popup; in our case it is the <div> called ‘divPopUp’
·         PopupDragHandleControlID - The ID of the popup header which will be used to drag the modal popup on the page; in our case it is the panel ‘panelDragHandle’.
There are some other properties like the BackgroundCssClass, DropShadow etc. which modify the appearance of the popup. To know more about the other properties of the ModalPopup Extender, check this link.
The divPopUp and panelDragHandle make use of css which is declared as shown below:
<head id="Head1" runat="server">
<title>GridView With ModalPopUpExtender</title>
<style type="text/css">
    body
    {
        font: normal 12px auto "Trebuchet MS", Verdana;   
        background-color: #ffffff;
        color: #4f6b72;      
    }
 
    .popUpStyle
    {
        font: normal 11px auto "Trebuchet MS", Verdana;   
        background-color: #ffffff;
        color: #4f6b72
        padding:6px;     
        filter: alpha(opacity=80);
        opacity: 0.8;
    }
   
    .drag
    {
         background-color: #dddddd;
         cursor: move;
         border:solid 1px gray ;
    }
</style>
 
</head>
The divPopUp also contains the GridView control to display the CustomerDetails. If you have to display only read-only data, you can use a lighter control like the Repeater instead of the GridView.
Step 8: The last step is to invoke the ModalPopup and populate the GridView2 with the CustomerDetails; the user has requested for. Add a click event to the LinkButton and add the following code in the event handler
<asp:LinkButton runat="server" ID="lnkCustDetails" Text='<%# Eval("CustomerID") %>' OnClick="lnkCustDetails_Click" />
C#
protected void lnkCustDetails_Click(object sender, EventArgs e)
{
    // Fetch the customer id
    LinkButton lb = sender as LinkButton;
    string custID = lb.Text;
    lblCustValue.Text = custID;
    // Connection
    string constr = System.Web.Configuration.WebConfigurationManager.
ConnectionStrings["NorthwindConnectionString"].ConnectionString;
    string sql = "SELECT CompanyName, ContactName, Address FROM Customers WHERE CustomerID = @CustID";
    SqlConnection connection = new SqlConnection(constr);
    SqlCommand cmd = new SqlCommand(sql, connection);
    cmd.Parameters.AddWithValue("@CustID", custID);
    cmd.CommandType = CommandType.Text;
    connection.Open();
    SqlDataReader dr = cmd.ExecuteReader();
    // Bind the reader to the GridView
    // You can also use a lighter control
    // like the Repeater to display data
    GridView2.DataSource = dr;
    GridView2.DataBind();
    connection.Close();
    // Show the modalpopupextender
    ModalPopupExtender1.Show();
   
}
VB.NET
Protected Sub lnkCustDetails_Click(ByVal sender As Object, ByVal e As EventArgs)
      ' Fetch the customer id
      Dim lb As LinkButton = TryCast(sender, LinkButton)
      Dim custID As String = lb.Text
      lblCustValue.Text = custID
      ' Connection
      Dim constr As String = System.Web.Configuration.WebConfigurationManager.
ConnectionStrings("NorthwindConnectionString").ConnectionString
      Dim sql As String = "SELECT CompanyName, ContactName, Address FROM Customers WHERE CustomerID = @CustID"
      Dim connection As New SqlConnection(constr)
      Dim cmd As New SqlCommand(sql, connection)
      cmd.Parameters.AddWithValue("@CustID", custID)
      cmd.CommandType = CommandType.Text
      connection.Open()
      Dim dr As SqlDataReader = cmd.ExecuteReader()
      ' Bind the reader to the GridView
      ' You can also use a lighter control
      ' like the Repeater to display data
      GridView2.DataSource = dr
      GridView2.DataBind()
      connection.Close()
      ' Show the modalpopupextender
      ModalPopupExtender1.Show()
 
End Sub
Note: Remember to add the namespace System.Data.SqlClient
It’s time to run the application and test the functionality. When you run the application, a GridView with the Orders data is displayed as shown below:
 GridView Display
On clicking on any of the CustomerID, a ModalPopup with the Customer details appears as shown below:
 Modal PopUp Extender
So that was the ModalPopup Extender for you. A lot of developers I know, have used this control to handle common scenarios like editing data or display images in pop-ups. The ModalPopup Extender is a very handy control and I hope this article has given you some insights of how to use this control. The entire source code of this article in C# and VB.NET can be downloaded from here. I hope the article was useful and I thank you for viewing it.

This article has been editorially reviewed by Suprotim Agarwal.

Absolutely Awesome Book on C# and .NET

C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.

We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).

Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.

Click here to Explore the Table of Contents or Download Sample Chapters!

What Others Are Reading!
Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+

Author
Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of DotNetCurry, DNC Magazine for Developers, SQLServerCurry and DevCurry. He has also authored a couple of books 51 Recipes using jQuery with ASP.NET Controls and The Absolutely Awesome jQuery CookBook.

Suprotim has received the prestigious Microsoft MVP award for Sixteen consecutive years. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that offers Digital Marketing and Branding services to businesses, both in a start-up and enterprise environment.

Get in touch with him on Twitter @suprotimagarwal or at LinkedIn



Page copy protected against web site content infringement 	by Copyscape




Feedback - Leave us some adulation, criticism and everything in between!
Comment posted by William Snell on Friday, October 10, 2008 12:11 PM
Thanks for putting this article together. I've used a modal pop-up at work, and it's good to have a walk-through. The one thing that I'm wondering after reading this article is why you have a button listed in the TargetControlID attribute, but then have the button's display set to none and invoke the ModalPopup window explicitly via a LinkButton. was this done because you must list a TargetControlID, but you wanted to invoke specific behavior prior to the ModalPopup window opening?
Comment posted by Suprotim Agarwal on Monday, October 13, 2008 8:25 AM
William: Good question. I feel glad when smart readers like you observe these details!!

Honestly speaking its not a very elegant solution using the hidden button. The hidden button 'would help' when you have multiple buttons/links in your page calling the ModalExt and the content of the ModalExtender dynamically changes on each call. In that case, how does the Modal extender determine what the TargetControlID should be? So we apply a hack to set the TargetControlID to a hidden button.

I should have put that in the article, nevertheless I am glad that you asked!!
Comment posted by Siranjeevi on Friday, October 17, 2008 6:22 AM
This Sample Nice , Thanks
Comment posted by Tim Meers on Wednesday, November 12, 2008 1:50 PM
This is pretty handy to see this done, and done without loads of other things to blur what you were trying to accomplish. Simple and easy to read example, and just in time because I was looking to do just this same functionality tonight.
Comment posted by Suprotim Agarwal on Wednesday, November 12, 2008 11:44 PM
Siranjeevi, Tim: Good to know that the article was helpful.
Comment posted by Charandeep on Thursday, November 13, 2008 4:58 AM
Great article. Very very helpful. Very helpful from beginer's prospective too...

Hat off to u man!!!!
Comment posted by vivek on Thursday, November 13, 2008 10:08 AM
Nice Article, but there is scope to be improvize further.
What if you are not using SQl Server, can't use SqlDataSource and
If you want your Detail (Modelpopup) to be more generic and you want it to allow editable, updatable.

Can you make it more generic, That would be really great.
Comment posted by Patrick Huber on Thursday, November 13, 2008 4:17 PM
My app is choking on <cc1:ModalPopupExtender saying unknown server tag...

Suggestions?
Comment posted by Patrick Huber on Thursday, November 13, 2008 5:53 PM
My app is choking on <cc1:ModalPopupExtender saying unknown server tag...

Suggestions?
Comment posted by Suprotim Agarwal on Friday, November 14, 2008 12:57 AM
Vivek: Thanks for your comments. I will plan an article sometime later with the ObjectDataSrc

Patrick: Make sure you have a reference to the AJAX COntrol toolkit. When you drag and drop the ModalPopUpExtender from the Toolkit, Visual Studio automatically creates one for you.

It looks similar to the following:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

Comment posted by A. Soong on Monday, January 5, 2009 6:14 PM
Great article but I'm running into a postback issue:

I have the link button inside a nested gridview which is within an update panel.  Everytime I click a link button, a full postback occurs - which is not the desired result.  I tried googling and all of the suggestions I've seen are similar to this blog post:

http://bloggingabout.net/blogs/rick/archive/2008/04/02/linkbutton-inside-updatepanel-results-in-full-postback-updatepanel-not-triggered.aspx

Unfortunately, it didn't work for me.  Anyone else encounter this problem or know how to resolve it?

TIA
A. Soong
Comment posted by A. Soong on Monday, January 5, 2009 6:47 PM
Great article but I'm running into a postback issue:

I have the link button inside a nested gridview which is within an update panel.  Everytime I click a link button, a full postback occurs - which is not the desired result.  I tried googling and all of the suggestions I've seen are similar to this blog post:

http://bloggingabout.net/blogs/rick/archive/2008/04/02/linkbutton-inside-updatepanel-results-in-full-postback-updatepanel-not-triggered.aspx

Unfortunately, it didn't work for me.  Anyone else encounter this problem or know how to resolve it?

TIA
A. Soong
Comment posted by kunal on Wednesday, February 18, 2009 9:41 AM
<asp:GridView ID="gvPaymentException"

                   <asp:TemplateField HeaderText="Accept">
                        <ItemTemplate>
                            <asp:ImageButton ID="imgAccept" CommandName="Accept" CommandArgument='<%# Container.DisplayIndex %>' runat="server" ImageUrl="~/App_Themes/LampTheme/Images/unchecked.gif" />
                        </ItemTemplate>
                        <HeaderStyle Font-Underline="False" HorizontalAlign="Center"/>
                        <ItemStyle HorizontalAlign="center" />
                    </asp:TemplateField>

<asp:Button id="btnAllocateFund" runat="server" style="display:none" />
        <cc1:ModalPopupExtender ID="ModalPopupExtender1" PopupDragHandleControlID="pnlAllocateFund" DropShadow="true"
        Drag="true" ru



    protected void gvPaymentException_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        ImageButton imgSelected = new ImageButton();
        int index = Convert.ToInt32(e.CommandArgument);
        switch (e.CommandName)
        {
            case "Accept":
                imgSelected = (ImageButton)gvPaymentException.Rows[index].FindControl("imgAccept");
                ModalPopupExtender1.Show();
                break;

        imgSelected.ImageUrl = "~/App_Themes/LampTheme/Images/checked.gif";
        gvPaymentException.Rows[index].RowState = DataControlRowState.Selected;
Comment posted by Aardsoft on Friday, February 20, 2009 6:13 PM
Good article. Did you get any further making a more generic popup object? This would be really cool.
Comment posted by Suprotim Agarwal on Sunday, February 22, 2009 3:49 AM
Aardsoft: Not Yet! But there are many around. Check the jQuery ones..way too cool.
Comment posted by mandarj123 on Saturday, March 7, 2009 5:15 AM
Article was very helful can you tell how can i avoid postback after clicking on a close button after showing modalpopupextender..plzz helpp
Comment posted by tasnim on Wednesday, March 25, 2009 4:53 AM
hi,
ive tried your code.But in firefox there seems to be an issue with it.Wen i close the file , the div is visible for a second and goes.Could you give me a solution for this.

regards,
thas.
Comment posted by Suprotim Agarwal on Thursday, March 26, 2009 8:47 AM
tasnim: I have tried the code and it seems fine. Can you send me a screenshot and I will look into it.
Comment posted by Bruce Holliday on Tuesday, April 28, 2009 8:22 AM
Hi, Excellent tute. Im nearly there with it but need to use a detailview or formview. tried but failke. Whats the syntax to replace this code please.
Dim dr As SqlDataReader = cmd.ExecuteReader()
        ' Bind the reader to the GridView
        ' You can also use a lighter control
        ' like the Repeater to display data
        GridView2.DataSource = dr
        GridView2.DataBind()
        connection.Close()
Comment posted by Matthew on Wednesday, June 10, 2009 5:33 PM
Hi. Love the tutorial but have a few questions as I'm trying to do this for a page I'm developing.

1) How exactly are you wiring the btnShowModalPopup to the link button in the template field? Even with a linkbutton_click even it never gets called on the client side (using VS2008). Since I couldn't get the linkbutton code to fire, I'm firing the code on GridView select.

2) When I use the ModalPopupName.Show() at the end of the VB code it calls the modal a second time. Since I'm wired up to the GridView on select, clicking a row flashes the ModalPopup but doesn't keep it open. When include the modal.show() it flashes a second time then stays open.

I'm currently using another modal popup elsewhere on the same page, this one works like a champ, but it's not tied to a gridview, simply an independent link button.  Seems like adding a modal popup to a gridview is more pain than it's worth.

Thanks again!
Comment posted by riyas on Wednesday, July 15, 2009 10:45 AM
How to Delete Records  in girdview  viewingPage Only... like delete Mails in yahoo and Gamil
Comment posted by Suprotim Agarwal on Friday, July 17, 2009 2:43 AM
riyas: I am not sure I understand your question. What is viewingPage only?
Comment posted by FFowler on Tuesday, July 21, 2009 2:34 PM
Thank you very kindly for your wonderful article. I am a beginner and am finding all kinds of great things to work with due to the unselfish acts of others like yourself. Clear and concise.  Only problem I have is trying to understand the button that is hidden that is used in the TargetControlID property? Maybe you could help me understand that too. Again..many thanks!
Comment posted by FFowler on Tuesday, July 21, 2009 3:21 PM
I believe I spoke too soon about understanding. Actually just another question. What if I was doing another query in which I would need the CustomerID and OrderID. I see how to retrieve the one value, but how could you retrive data when the collection is more than one? Any help would be appreciated.
Comment posted by Cynthia Serrao on Wednesday, July 22, 2009 11:05 PM
To get the example to work for me, I added the code below that is flush left:
<pre>
<div class="popUpStyle" id="divPopUp" style="display:none;">
    <asp:Panel runat="Server" ID="panelDragHandle" CssClass="drag">
        Hold here to Drag this Box
    </asp:Panel>

<asp:UpdatePanel ID="panelDetail" runat="server" UpdateMode="Conditional">
<ContentTemplate>

    <asp:Label runat="server" ID="lblText" Text="CustomerID: "></asp:Label>
    <asp:Label ID="lblCustValue" runat="server"></asp:Label>
    <asp:GridView ID="GridView2" runat="server">
    </asp:GridView>

</ContentTemplate>
</asp:UpdatePanel>
                        
    <asp:Button ID="btnClose" runat="server" Text="Close" />
   <br />
</div>
</pre>

Make certain UpdateMode="Conditional" for the added panel.

Also, in the aspx.vb file add the following line before the call to ModalPopupExtender1.Show():

panelDetail.Update()

I came upon this solution after reading:

http://mattberseth.com/blog/2007/07/modalpopupextender_example_for.html
Comment posted by Suprotim Agarwal on Tuesday, July 28, 2009 2:05 AM
Fflower: You can use CommandArgument as shown here
CommandArgument='<%#Eval("CustomerID") + ";" +Eval("OrderID")%>'

Cynthia: Thanks for sharing it with viewers
Comment posted by Patricia Marchand on Tuesday, July 13, 2010 6:55 PM
I have spent hours trying to find an example, I was going to give up, then I found your site!
So many thanks, an example which actually works first time, so rare.
Comment posted by swathi on Wednesday, November 3, 2010 4:21 AM
Hi
I run This Program in my computer,it is showing some errors like javascript(_dopsot...),so pls reply me,i have to complete my task today only.
Comment posted by swathi on Wednesday, November 3, 2010 4:22 AM
Hi
I run This Program in my computer,it is showing some errors like javascript(_dopsot...),so pls reply me,i have to complete my task today only.
Comment posted by swathi on Wednesday, November 3, 2010 4:47 AM
Hi
I run This Program in my computer,it is showing some errors like javascript(_dopsot...),so pls reply me,i have to complete my task today only.
Comment posted by sajid shaikh on Tuesday, March 1, 2011 12:50 AM
This is the best article I ever seen.Very easy and self explanatory. No more confusion. I am expecting different other samples from the AJAX control Tool kit from your curry.
Comment posted by Nic on Tuesday, March 1, 2011 11:00 AM
My app hurls on ModalPopupExtender1.Show(). Can not find a solution to this problem anywhere. Can any one help??
Comment posted by Rajesh on Saturday, May 28, 2011 3:09 AM
As u mantioned in the article, I m not getting output for ModalPopupExtender,
Can u plz tell me ?
Comment posted by Rajesh on Saturday, May 28, 2011 4:14 AM
As u mantioned in the article, I m not getting output for ModalPopupExtender,
Can u plz tell me ?
Comment posted by angelo on Wednesday, July 13, 2011 3:47 PM
hola me gusto el tutorial la verdad quisiera consultar como puedo hacer para que ese panel popup sea reutilizable ya que slo lo invoco desde un asp. especifico ejempo tenglo una ventana popup de busqueda de personas como puedo acer ara llamarlo de diferentes  .aspx ,ayudarya cualkier ayuda.
Comment posted by Abu Abdullah on Wednesday, October 26, 2011 2:19 AM
Nice one.  How about if I have a button that will need to navigiate to another page? It will not work!!!
Comment posted by Magesh kumar Sadagopan on Monday, October 31, 2011 10:25 PM
The Article reduced my effort on building code. it is an excellent.
Comment posted by Iwan on Tuesday, November 1, 2011 2:54 AM
Why when I click the CustomerID, ModalPopup can't show. Can any one help plz??
I am using vb.net
Comment posted by Soumya on Wednesday, February 22, 2012 2:17 AM
I was exactly looking for this after a log Googling... Many thanks...
Comment posted by Nurit Meir on Tuesday, August 28, 2012 10:15 AM
A+

this was exactly what I needed!
Comment posted by hardev singh on Tuesday, September 3, 2013 4:20 AM
thanks
Comment posted by sanjeev on Thursday, December 26, 2013 7:18 AM
hello friends
Comment posted by shivkumar on Tuesday, March 25, 2014 5:20 AM
I have web form in asp.net wheren admin can add products and the records are stored in ord_mstr table.
I have another web form where customer can purchase products and it is stored in detail table. How to update stock.give example.