-
LoadControl ***
I was trying to set a property on a UserControl I Load like 50 of at a time. anyway. first i did this.
Code:
public override System.Web.UI.Control FindControl(string id)
{
if(id.IndexOf("PictureGUID") != -1)
{
string[] s = id.Split('|');
PictureGUID = s[1];
return null;
}
return base.FindControl(id);
}
And, I was pretty much 10 minutes later calling myself a dumb @$$ because well duh cast it and just set the property....
To the true question. I have a Control that loads an image and has a button. The button deletes the image from the db. The UserControl is loaded dynamicly and for some reason on the first postback after it's deleted there is an empty box. I.E. the UserContol with a invalid picture the x.
Anybody have any ideas?
-
"for some reason on the first postback after it's deleted there is an empty box. I.E. the UserContol with a invalid picture the x.
"
So basically, you deleted the picture, and now the control either has no picture to load, or can't find the picture? Do you need a 'No Picture Available' picture that loads by default?
-
after the delete I set the visible of the user control to false. This seems to be working.