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
aadi patel
NA
53
33.4k
Gridview Buttonfile Click in new window not working
Oct 30 2012 4:29 AM
0 down vote favorite I have gridview. i want to open new page on following button click My
button click not working !
<asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCommand="GridView1_RowCommand" >
<Columns> <asp:ButtonField Text="TASK" ButtonType="Button" CommandName="TASK" /> </Columns> </asp:GridView>
i want to open new page on following button click
My button click not working !
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("TASK"))
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow gvrow = GridView1.Rows[index];
string name= gvrow.Cells[1].Text;
string surname= gvrow.Cells[2].Text;
Response.Write("window.open( 'Mypage.aspx?name="+name+"&surname="+surname+"' , '-blank' );");
}
}
how to open boundfield button click in new window ? please help.
Reply
Answers (
2
)
Displaying Data
What is use of NamingContainer in asp.net