Wrox Programmer Forums
|
BOOK: ASP.NET AJAX Programmer's Reference : with ASP.NET 2.0 or ASP.NET 3.5 ISBN: 978-0-470-10998-4
This is the forum to discuss the Wrox book ASP.NET AJAX Programmer's Reference: with ASP.NET 2.0 or ASP.NET 3.5 by Dr. Shahram Khosravi ; ISBN: 978-0-470-10998-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET AJAX Programmer's Reference : with ASP.NET 2.0 or ASP.NET 3.5 ISBN: 978-0-470-10998-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2009, 01:33 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default add AJAX dynamically

hello fiends,


I have A table in my page with tow columns in 1st I have a GRID and in 2nd col I am a label.
I have a LINKBUTTON in first cell of GRID and I am displaying the the data in Label when I click on LINKBUTTON. I have to make asynchronize call through LINKBUTTON. So what I am doing is:


aspx.cs
protected void gvFiles_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowIndex != -1)
{
//Adding AJAX to asynchronize call.
UpdatePanel UP = new UpdatePanel();
AsyncPostBackTrigger AT = new AsyncPostBackTrigger();
LinkButton lnkbt_show = (LinkButton)(e.Row.Cells[0].FindControl("B1"));
AT.ControlID = "lnkbt_show";
AT.EventName = "RowCommand";
UP.Triggers.Add(AT);
UP.ContentTemplateContainer.Controls.Add(lbl_FileC ontents);
e.Row.Cells[0].Controls.Add(UP);
}
}


Thanks
__________________
DPK..





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to dynamically add propery in a Class in C#? coolcoder2007 C# 2005 8 January 5th, 2009 09:29 PM
How add data into DataGrid dynamically AccessAasif@aol.com C# 2005 1 October 24th, 2007 03:27 AM
Dynamically Add input tags Jstmehr4u3 Javascript How-To 2 July 29th, 2003 04:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.