Click here to Skip to main content
15,886,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a grid with image and download link button
I want to show a drag panel of login when user clicks on download link if session is not available

please tell me solution, because I am not able to get control's id of grid by javascript

thanks in advance
Posted
Updated 14-Sep-11 0:34am
v3
Comments
Pravin Patil, Mumbai 14-Sep-11 6:33am    
Edited for Readability....!
Pravin Patil, Mumbai 14-Sep-11 6:35am    
So what is yout question... Are you stuck with getting client ID of the Grid or showing drag panel...?

1 solution

You could set the NavigateUrl Property of your LinkButton to a ShadowBox
like:
C#
linkbutton.attributes.Add("onclick","shadowbox.open(
{content:'../myLoginPage.aspx"', player:'iframe',  width:500, height:500}

);");

if the session is not available.

You have to do that in the onRowDataBound Event of the gridview


In header section of the Page, you have to initialize the Shadowbox:
JavaScript
$(document).ready(function () {
            Shadowbox.init({
                language: 'en',
                players: ['iframe'],
                player: 'iframe',
                displayNav: false,
                handleOversize: 'drag',
                skipSetup: false,
                overlayOpacity: 0.5,
                height: 10
            });

}
 
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