I am storing name and last name in two labels in main page. I also have those values in a class (class doesnt do much but i am using them for future expansion). I have a user co
You need to create properties on your control to hold these values; then from the page code, simply assign the values to the properties in the control.
On your control, you can have something like
public string FirstName
{
get {
if (ViewState["FirstName"] == null)
return string.Empty;
return ViewState["FirstName"].ToString();
}
set {
ViewState["FirstName"] = value;
}
}