S
settyv
Hi,
How do i open PDF document with linkbutton using Datagrid control ? I
am using the below code to open the PDF doc.
<asp:TemplateColumn HeaderText="Minute Order">
<ItemTemplate>
<a href="file:///C:\Documents and Settings\Vs3946\My
Documents\Mass_title.pdf" target="_blank">
<asp:LinkButton ID="linkView" runat="server"
CausesValidation="false" CommandName="View" Text="View
"></asp:LinkButton></a>
</ItemTemplate>
</asp:TemplateColumn>
Please let me know how can i do that .Also i need to call the function
on click of Linkbutton.For that i have written code like this
private void grdTest_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
LinkButton btn = e.Item.FindControl("linkView") as
LinkButton;
// SearchParams sp=new SearchParams();
// Minute Min=new Minute();
// e.Item.Attributes["onclick"] =
Min.GetMinuteOrderPdf(sp).ToString ();
e.Item.Attributes["onclick"]
=string.Format("document.getElementById('{0}').click();",
btn.ClientID);
}
Thanks,
Vishnu
How do i open PDF document with linkbutton using Datagrid control ? I
am using the below code to open the PDF doc.
<asp:TemplateColumn HeaderText="Minute Order">
<ItemTemplate>
<a href="file:///C:\Documents and Settings\Vs3946\My
Documents\Mass_title.pdf" target="_blank">
<asp:LinkButton ID="linkView" runat="server"
CausesValidation="false" CommandName="View" Text="View
"></asp:LinkButton></a>
</ItemTemplate>
</asp:TemplateColumn>
Please let me know how can i do that .Also i need to call the function
on click of Linkbutton.For that i have written code like this
private void grdTest_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
LinkButton btn = e.Item.FindControl("linkView") as
LinkButton;
// SearchParams sp=new SearchParams();
// Minute Min=new Minute();
// e.Item.Attributes["onclick"] =
Min.GetMinuteOrderPdf(sp).ToString ();
e.Item.Attributes["onclick"]
=string.Format("document.getElementById('{0}').click();",
btn.ClientID);
}
Thanks,
Vishnu