How to know which set to transfer data tohttp://forums.asp.net/t/1797555.aspx/1?How+to+know+which+set+to+transfer+data+toFri, 27 Apr 2012 06:51:01 -040017975554954097http://forums.asp.net/p/1797555/4954097.aspx/1?How+to+know+which+set+to+transfer+data+toHow to know which set to transfer data to <p>Hi,<br> I have 3 &nbsp;sets of controls. Each set has a Search button and two textboxes (IDNumber and Fullname). When the Search button is clicked, a&nbsp;modalpopupextender will come up. It contains a gridview containing a select button, the id number and full name of a user. When the select button is clicked, it should transfer the id number and full name to the textboxes that are in the same set as to the Search button that trigged it.</p> <p>I've disabled postback of the Search buttons and use javascript to show the&nbsp;modalpopupextender.</p> <p>How can I make the&nbsp;modalpopupextender know which set called it and to transfer the selected data to?</p> 2012-04-27T04:48:15-04:004954111http://forums.asp.net/p/1797555/4954111.aspx/1?Re+How+to+know+which+set+to+transfer+data+toRe: How to know which set to transfer data to <p>Hi,</p> <p>Probably you need to pass the ModalPopupExtender control ID to the javascript function and pass the data accordingly!</p> <p>Hope it helps u...</p> 2012-04-27T04:58:51-04:004954119http://forums.asp.net/p/1797555/4954119.aspx/1?Re+How+to+know+which+set+to+transfer+data+toRe: How to know which set to transfer data to <p>hey</p> <p>Try this link it will help you.</p> <p><a href="http://www.codeproject.com/Articles/34996/ASP-NET-AJAX-Control-Toolkit-ModalPopupExtender-Co">http://www.codeproject.com/Articles/34996/ASP-NET-AJAX-Control-Toolkit-ModalPopupExtender-Co</a></p> 2012-04-27T05:04:35-04:004954257http://forums.asp.net/p/1797555/4954257.aspx/1?Re+How+to+know+which+set+to+transfer+data+toRe: How to know which set to transfer data to <p>Hi,</p> <p>Try this-</p> <pre class="prettyprint">&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;How to know which set to transfer data to.aspx.cs&quot; Inherits=&quot;How_to_know_which_set_to_transfer_data_to&quot; %&gt; &lt;%@ Register TagPrefix=&quot;asp&quot; Namespace=&quot;AjaxControlToolkit&quot; Assembly=&quot;AjaxControlToolkit&quot; %&gt; &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt; &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt; &lt;head runat=&quot;server&quot;&gt; &lt;script src=&quot;http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function () { $(&quot;#search&quot;).click(showModalPopupViaClient); $(&quot;.selectidName&quot;).click(function () { current.find(&quot;input[id*=IDNumber]&quot;).val($(this).closest(&quot;tr&quot;).find(&quot;td:eq(0)&quot;).html()); current.find(&quot;input[id*=Fullname]&quot;).val($(this).closest(&quot;tr&quot;).find(&quot;td:eq(1)&quot;).html()); hideModalPopupViaClient(); }); }); var current = null; function showModalPopupViaClient() { current = $(this).closest(&quot;div&quot;); var modalPopupBehavior = $find('programmaticModalPopupBehavior'); modalPopupBehavior.show(); } function hideModalPopupViaClient() { var modalPopupBehavior = $find('programmaticModalPopupBehavior'); modalPopupBehavior.hide(); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt; &lt;div&gt; &lt;asp:ToolkitScriptManager ID=&quot;ToolkitScriptManager1&quot; runat=&quot;Server&quot; /&gt; &lt;div&gt; &lt;asp:TextBox ID=&quot;IDNumber&quot; runat=&quot;server&quot;&gt;&lt;/asp:TextBox&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;asp:TextBox ID=&quot;Fullname&quot; runat=&quot;server&quot;&gt;&lt;/asp:TextBox&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;input id=&quot;search&quot; type=&quot;button&quot; value=&quot;search&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt; &lt;/div&gt; &lt;ajaxToolkit:ModalPopupExtender runat=&quot;server&quot; ID=&quot;programmaticModalPopup&quot; BehaviorID=&quot;programmaticModalPopupBehavior&quot; TargetControlID=&quot;hiddenTargetControlForModalPopup&quot; PopupControlID=&quot;programmaticPopup&quot; BackgroundCssClass=&quot;modalBackground&quot; DropShadow=&quot;True&quot; PopupDragHandleControlID=&quot;programmaticPopupDragHandle&quot; RepositionMode=&quot;RepositionOnWindowScroll&quot;&gt; &lt;/ajaxToolkit:ModalPopupExtender&gt; &lt;asp:Button runat=&quot;server&quot; ID=&quot;hiddenTargetControlForModalPopup&quot; Style=&quot;display: none&quot; /&gt; &lt;asp:Panel runat=&quot;server&quot; CssClass=&quot;modalPopup&quot; ID=&quot;programmaticPopup&quot; Style=&quot;display: none; padding: 10px&quot;&gt; &lt;asp:Panel runat=&quot;Server&quot; ID=&quot;programmaticPopupDragHandle&quot; Style=&quot;cursor: move; background-color: #DDDDDD; border: solid 1px Gray; color: Black; text-align: center;&quot;&gt; ModalPopup shown and hidden in code &lt;/asp:Panel&gt; &lt;asp:GridView ID=&quot;grid&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;False&quot;&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText=&quot;Id&quot;&gt; &lt;ItemTemplate&gt; &lt;%# Eval(&quot;ID&quot;) %&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&quot;Name&quot;&gt; &lt;ItemTemplate&gt; &lt;%# Eval(&quot;Name&quot;) %&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText=&quot;Name&quot;&gt; &lt;ItemTemplate&gt; &lt;a href=&quot;#&quot; class=&quot;selectidName&quot;&gt;select&lt;/a&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;/asp:Panel&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p>I think you should use jQuery dialog for popup. </p> <p></p> 2012-04-27T06:51:01-04:00