Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to send value of query string in an array
    primarykey
    data
    text
    <p>I am making a <code>Crystal-Report</code> from data of <code>GridView</code>. The <code>GridView</code> has three columns in which two columns are filled with values coming from DataBase in a label and third column has a CheckBox which on check sends the value of these two columns as query string to the .cs page of <code>Crystal-Report</code>. The column value is used by the stored-procedure and then result is shown in the <code>Crystal-Report</code>. Now my problem is if user checks two <code>CheckBox</code> then the value of both columns should be sent to <code>Crystal-Report</code> page as array. How to implement this</p> <p>My code behind in <code>GridView</code> page is </p> <pre><code> protected void ChkCity_CheckedChanged(object sender, EventArgs e) { foreach (GridViewRow row in gdCityDetail.Rows) { bool ischecked = ((System.Web.UI.WebControls.CheckBox)row.Cells[0].FindControl("CheckBox2")).Checked; if (ischecked == true) { int getrow = Convert.ToInt32(e.CommandArgument); Label label1 = (Label )gdVilDetail.Rows[getrow].FindControl("label1"); Label label2= (Label )gdVilDetail.Rows[getrow].FindControl("label2"); Response.Redirect("~/crystal report/Landowner.aspx?Yojna=" + label1.text + "&amp;Village=" + label2.text); } </code></pre> <p>and the code on .cs page of <code>Crystal-Report</code> is </p> <pre><code> private void cityreport() { SqlCommand Cmd = new SqlCommand("Showvillage", Constr1); Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.Add("@Yojna_No", Request.QueryString[0]); Cmd.Parameters.Add("@Village_Code", Request.QueryString[1]); DataSet ds = new DataSet(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload