Hi All,
Hi All, I'm in a bit of a pickle here. I'm Binding the name of file to a LinkButton and intending to open that file on the LinkButton' click. I have the LinkButton in the TemplateField of a GridView control. Below is the code I'm using :
<asp:TemplateField HeaderText="Article Name">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" ForeColor="LightYellow" Text='<%# Eval("caption") %>'
Width="494px" CommandName="goto" CommandArgument='<%# Eval("file_name") %>'></asp:LinkButton>
</ItemTemplate>
<HeaderStyle ForeColor="White" />
<ItemStyle ForeColor="LightYellow" />
</asp:TemplateField>
And the Event Handler goes like :
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals("goto"))
{
fileToOpen = e.CommandArgument.ToString();
Response.Redirect(path + fileToOpen);
}
}
On clicking i get the above mentioned error 'Forbidden' from ASP Development Server 8.0.0.0