[Message Deleted]
-
I see you are storing the selected values in Session, so you can use that value from the second page. e.g.
Summary.aspx
protected void Page_Load(object sender,EventArgs e)
{
if(!Page.IsPostBack)
{
Pool pool = Session["POOL"] as Pool;
if(pool!=null)
{
string selectedYear = pool.Pool_Year;
string selectedCategory = pool.Pool_Category;//Now you can pass the selected year and category values to the underlaying database later or query.
}
}
}I hope I have not misunerstool your question. Second thing you can also pass this parameters as querystring, if there is no security concerns.
Response.Redirect("Summary.aspx?year" +ddlYear.SelectedValue + "&category=" + dlCategory.SelectedValue);
-
I see you are storing the selected values in Session, so you can use that value from the second page. e.g.
Summary.aspx
protected void Page_Load(object sender,EventArgs e)
{
if(!Page.IsPostBack)
{
Pool pool = Session["POOL"] as Pool;
if(pool!=null)
{
string selectedYear = pool.Pool_Year;
string selectedCategory = pool.Pool_Category;//Now you can pass the selected year and category values to the underlaying database later or query.
}
}
}I hope I have not misunerstool your question. Second thing you can also pass this parameters as querystring, if there is no security concerns.
Response.Redirect("Summary.aspx?year" +ddlYear.SelectedValue + "&category=" + dlCategory.SelectedValue);
Thank you, that is what I was looking for. However, I'm not sure how to pass the value into the query because the gridview that I am using is a user control that is already populated with all of the data. I need to restrict this to just show the data that meets the criteria of the user selection, so I need to change the datasource. Any ideas on how to do this would be greatly appreciated! Thanks
-
Thank you, that is what I was looking for. However, I'm not sure how to pass the value into the query because the gridview that I am using is a user control that is already populated with all of the data. I need to restrict this to just show the data that meets the criteria of the user selection, so I need to change the datasource. Any ideas on how to do this would be greatly appreciated! Thanks
Terick wrote:
I am using is a user control that is already populated with all of the data.
Why are you prepopulating the gridview. I think you should populate it when you have the user selection criteria. When you get the user selection criteria, in page load bind the gridview with selection criteria. OR Can't you rebind the gridview again when you get the user selection criteria? [Edit] By rebinding I mean clear the current datasource and set the new datasource. I hope I make it clear. :-) [/Edit]