I would apprecaite any assistance with this task..
SourceForm.aspx contains a databound gridview which I have added a checkbox column for multiple row selection. OnClick of a button I want to display any selected rows on another page, Target.aspx
So far I have successfully captured textbox input properites using PostBackUrl between the two, e.g.
SourcePage.aspx
<div>
Enter your name:
<asp:TextBox ID="_nameTextBox" runat="server" /><br />
Enter your age:
<asp:TextBox ID="_ageTextBox" runat="server" /><br />
<asp:CheckBox ID="_marriedCheckBox" runat="server" Text="Married?" /><br />
<asp:Button ID="_nextPageButton" runat="server" Text="Next page" PostBackUrl="Target.aspx"/>
<asp:Label ID="LabelTest" runat="server" Text="Hello anyway"></asp:Label>
</div>
Target.aspx
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
MessageLabel.Text = String.Format("<h3>Hello there {0}, you are {1} years" + " old and {2} married! {3}</h3>", PreviousPage.Name, PreviousPage.Age, If(PreviousPage.Married, "", "not"), PreviousPage.Hello)
End If
.
.
I have also been trying to adapt URL strings to do something similar, e.g.
SourcePage.aspx
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
Response.Redirect("GridViewMultiSelect3Target.aspx?Subject=" & GridView1.DataKeys(GridView1.SelectedIndex).Values("SubjectDetails").ToString() & "&Start=" & GridView1.DataKeys(GridView1.SelectedIndex).Values("StartTime").ToString() & "&Finish=" & GridView1.DataKeys(GridView1.SelectedIndex).Values("FinishTime").ToString() & "&Extra=" & GridView1.DataKeys(GridView1.SelectedIndex).Values("ExtraFinishTime").ToString())
End Sub
Target.aspx
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.TextBox1.Text = Request.QueryString("Subject")
Me.TextBox2.Text = Request.QueryString("Start")
Me.TextBox3.Text = Request.QueryString("Finish")
Me.TextBox3.Text = Request.QueryString("Extra")
End Sub
.
.
Some examples I've tried to follow point towards using DataKey Rows of chkSelected but I'm totally unfamiliar with this and have failed on a few tutorials.
So, I've thrown this out for some experienced advice, and preferably a good working example
Thanks