TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
hirdesh ronaldo
NA
4
13.5k
Prevent page refresh on linkbutton click in gridview
Feb 4 2014 2:22 AM
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
<ItemTemplate>
<asp:LinkButton ID="lnkviewtools" runat="server" OnClick="lnkviewtools_Click" Text='<%#Eval("varToolName") %>'></asp:LinkButton>
</ItemTemplate>
code for on click
protected void lnkviewtools_Click(object sender, EventArgs e)
{
LinkButton Lnk = (LinkButton)sender;
Session["toolname"] = Lnk.Text;
ClientScript.RegisterStartupScript(this.GetType(), "", "<script> window.showModalDialog('ViewToolProcurement.aspx', 'dialogHeight:100px;dialogWidth:280px;status:no'); </script>");
}
Reply
Answers (
3
)
Problem with session..!
Add user control to toolbox