Hi All,
I need help, I have one gridview and inside the gridview I have link buton which I create using Itemtemplate in gridview.
I am opening new popup window on linkbutton click in gridview. It works fine I am able to open popup window on linkbutton click.
the prob is when i click on link button whole page is refreshing before opening the popup.
I want to stop that page refresh. Please help me.. my code is given below
code for link button in gridview
code for on click
protected void lnkviewtools_Click(object sender, EventArgs e)
{
LinkButton Lnk = (LinkButton)sender;
Session["toolname"] = Lnk.Text;
ClientScript.RegisterStartupScript(this.GetType(), "", "");
}
{
LinkButton Lnk = (LinkButton)sender;
Session["toolname"] = Lnk.Text;
ClientScript.RegisterStartupScript(this.GetType(), "", "");
}
Abhijeet ChavanPosted Sep 3, 2015, 3:40 AM
Ram Sagar MouryaPosted Feb 4, 2014, 3:47 AM
if you are using Session["toolname"] only for the ViewToolProcurement.aspx page , then better to pass it as querystring.
Replace
With
);">Click
and add the following javscript to the page.
here we are binding an javascript method to the click event of the anchor tag and in the showToolProcurement method show the dialog.
i hope this will help you.
boycotoPosted Feb 4, 2014, 2:38 AM