1

I have a grid. there is multiple values in the grid. suppose there is candidate Id column in grid and there is check box in each row. I want to select multiple values of candidate Id through check box and pass this multiple selected values in the single query string to another page after passed it i will split the values using split() function and keep in array. because i have to perform some operation on target page using this multiple candidate ids. please give to some solution for this problem.

There is my grid. i have not include check box in this code

<asp:GridView ID="grdReq" runat="server" AutoGenerateColumns="false"    CssClass="SimpleGrid" OnRowDataBound="grdReq_RowDataBound">
<Columns>
  <asp:BoundField DataField="CandidateID" HeaderText="Candidate Id" />
  <asp:BoundField DataField="Candidate Name" HeaderText="Candidate Name" />
  <asp:BoundField DataField="Current Organization" HeaderText="Current Organization" />
  <asp:BoundField DataField="Current Designation" HeaderText="Current Designation" />
  <asp:BoundField DataField="Overall Exp" HeaderText="Overall Exp" />
  <asp:BoundField DataField="Qualification" HeaderText="Qualification" />
</Columns>
</asp:GridView>
7
  • You seem to have it all covered, apart from actually typing it, is there a problem you cannot solve? Commented Apr 12, 2013 at 12:36
  • Check this w3schools.com/asp/coll_querystring.asp Commented Apr 12, 2013 at 12:39
  • Thanks Guru Kara...i'll see Commented Apr 12, 2013 at 12:42
  • Is the problem finding out which checkboxes have been selected or assembling the query string with those values? Commented Apr 12, 2013 at 12:44
  • Yes Nerdwood,i have to select multiple check box then send to query string. please give me solution. Commented Apr 12, 2013 at 12:45

1 Answer 1

2

well i did something like that in the near past, procedure is:

  1. loop through your page to find check boxes and add those who are checked, in string builder like:
          StringBuilder sb = new StringBuilder();

           sb.Append(yourcheckbox);
            sb.Append(",");

on point of receiving you can split this using "," and you will have all the check boxes.

Good luck

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.