User1386166523 posted
Hello,
I have a GridView control on a Request2.aspx page. In the <Columns> section, there is a TemplateField showing project ids from the project table:
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" HeaderText="Project ID">
<ItemTemplate>
<asp:LinkButton ID="Lbtn_Select" runat="server" Text='<%# Eval("projectid") %>'
ToolTip="Click To View Details" PostBackUrl="~/Request2Detail.aspx"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
Gridview is populated by assigning datatable as datasource to gridview. The gridview shows project ids as links and the control transfers to Request2Detail.aspx page. In Request2Detail.aspx, I have to show information of the project id that was
clicked. However, I have not been able to pass the clicked project id value to the Request2Detail.aspx. Lbtn_Select.Text contains the project id for each row of Gridview. I read that through PostBackUrl property, we can access all controls
of the previous page using Request object such as TextBox1.Text = Request.Form["TextBox1"].ToString();
However, projectid is a TemplateField within a gridview.
Regards,
Shehzad