Avatar of DanGettel

asked on 

Using Cross-Page Postback to access gridview selected row values from previous page

I am having some problems figuring out how to use Cross-Page Postback to access the gridview selected row values in code behind from the previous page. The current columns of the gridview that appears on the first page are displayed below.  

What I would like to do is access the FirstName, LastName, and Report values for the selected row on the second page.

I have used Cross-Page Postbacks before, but not to do something like this with a gridview.

Thanks for the help.

	<asp:TemplateField ShowHeader="False">
            <asp:LinkButton ID="ID"  DataTextField="ID" runat="server" CausesValidation="False" 
                CommandName="Select" Text="Select" PostBackUrl="reschedule_appointment_form.aspx"></asp:LinkButton>
	<asp:boundfield DataField="Time" SortExpression="Time" HeaderText="Time">
	<asp:boundfield DataField="Day" SortExpression="Day" HeaderText="Day">
	<asp:boundfield DataField="DateTextShort" SortExpression="DateTextShort" HeaderText="DateTextShort">
	<asp:boundfield DataField="FirstName" SortExpression="FirstName" HeaderText="FirstName">
	<asp:boundfield DataField="LastName" SortExpression="LastName" HeaderText="LastName">
	<asp:checkboxfield DataField="First" SortExpression="First" HeaderText="FirstApt">
	<asp:checkboxfield DataField="Report" SortExpression="Report" HeaderText="Report">

Open in new window

.NET ProgrammingVisual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon