you make an error on a class attribute persistence.
PerCentValue='<%# DataBinder.Eval(Container, "DataItem.Status") %>'
It's only a initialization (and the value is setup in the first page access). When you perform a postback you lost this value. You need to store it somewhere like viewstate.
Try to remove _PerCentValue attribute and modify property with this one:
public string PerCentValue
{
get {
return (string)ViewState["PerCentValue"]; }
set { ViewState["PerCentValue"] =
value; } }
Wamba {WamBlog}Dont forget to click "Mark as Answer" on the post that helped you.
This credits the member,earns you a point & marks your thread as Resolved.
Wamba
Member
404 Points
72 Posts
Re: Value not passing to User Control Code Behind page
May 13, 2008 01:07 PM|LINK
Hi Brad!
you make an error on a class attribute persistence.
PerCentValue='<%# DataBinder.Eval(Container, "DataItem.Status") %>' It's only a initialization (and the value is setup in the first page access). When you perform a postback you lost this value. You need to store it somewhere like viewstate.
Try to remove _PerCentValue attribute and modify property with this one:
public string PerCentValue{
get { return (string)ViewState["PerCentValue"]; } set { ViewState["PerCentValue"] = value; } }Dont forget to click "Mark as Answer" on the post that helped you.
This credits the member,earns you a point & marks your thread as Resolved.