B
Beppe
Hi all! I have a .aspx page with 3 hyperlink and 1 checkbox. The NavigateUrl
hyperlinks' property retreive dinamically its value (they reload the same
page with different params and querystrings); the method in the codebehind
is:
protected string GetLinkUrl(object annoCdSObj)
{
return "manifesto.aspx?CodCdS=" + CdSScelto.CodCdS.ToString() + "&Anno=" +
((AnnoCdS)annoCdSObj).Anno.ToString() + "&SCY=" + (this.crossYear.Checked ?
"true" : "false");
}
The "SCY" value is the state of the checkbox.
The checkbox (AutoPostBack == true) retrieve its Checked property
dinamically:
protected bool IsChecked()
{
if (!IsPostBack)
{
if (Request.QueryString["SCY"].ToLower() == "true")
return true;
else return false;
}
return this.crossYear.Checked;
}
The page has to do as follows:
I load the page with SCY == false --> Checked = false --> OK
If I check the checkbox, the form post backs e now Checked == true --> OK
Now, If I click on a hyperlink, the page is reloaded with a querystring with
SCY == true and the checkbox is checked --> OK
The problem is that if I click another time a hyperlink, the SCY param is
false!! How is it possible the param is false, if the checkbox is checked??
Thanks a lot, Giuseppe
hyperlinks' property retreive dinamically its value (they reload the same
page with different params and querystrings); the method in the codebehind
is:
protected string GetLinkUrl(object annoCdSObj)
{
return "manifesto.aspx?CodCdS=" + CdSScelto.CodCdS.ToString() + "&Anno=" +
((AnnoCdS)annoCdSObj).Anno.ToString() + "&SCY=" + (this.crossYear.Checked ?
"true" : "false");
}
The "SCY" value is the state of the checkbox.
The checkbox (AutoPostBack == true) retrieve its Checked property
dinamically:
protected bool IsChecked()
{
if (!IsPostBack)
{
if (Request.QueryString["SCY"].ToLower() == "true")
return true;
else return false;
}
return this.crossYear.Checked;
}
The page has to do as follows:
I load the page with SCY == false --> Checked = false --> OK
If I check the checkbox, the form post backs e now Checked == true --> OK
Now, If I click on a hyperlink, the page is reloaded with a querystring with
SCY == true and the checkbox is checked --> OK
The problem is that if I click another time a hyperlink, the SCY param is
false!! How is it possible the param is false, if the checkbox is checked??
Thanks a lot, Giuseppe