Click here to Skip to main content
15,909,466 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<pre lang="xml"><asp:GridView ID="grvTest" runat="server" AutoGenerateColumns="false">
        <Columns>
            <asp:BoundField DataField="Name" HeaderText="Name" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:HyperLink ID="hLinkPopup" runat="server" Text="Click Here">
                    </asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView></pre>

I have above grid view having 10 records
now i want that when i click on hyperlink the Pop up should be display having name of that selected row

help me how to write JQuery
Posted

Hi,

1. Change the asp:HyperLink to following,

<a href="#" onclick="toList.popUpSheet('<%#Eval("order_no") %>')" /><%#Eval("order_no") %></a>

2. Add the reference of the jquery File in your aspx, like below,

<script type="text/javascript" src="../JS/TOList.js"></script>

3. Add the following code in your jQuery file,

//To Open Pop Window while clicking the gridview Link
popUpSheet: function(No) {

myWindow = window.open("WepPage1.aspx?OrderNo=" + No,
"Sheet", "top=0, left=0, width=900, height=780, resizable=yes, scrollbars=yes, modal=yes");
myWindow.focus();
return false;
}
 
Share this answer
 
its very easy,
Use Modal Pop up Extender which is control of ajax tool kit,

http://www.codeproject.com/Articles/24087/Modal-Popup-Extender-Basics
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900