|
-
May 25th, 2004, 12:51 AM
#1
Thread Starter
Frenzied Member
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?
Last edited by Lethal; May 25th, 2004 at 07:33 AM.
Magiaus
If I helped give me some points.
-
May 25th, 2004, 07:29 AM
#2
I wonder how many charact
"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?
-
May 25th, 2004, 12:32 PM
#3
Thread Starter
Frenzied Member
after the delete I set the visible of the user control to false. This seems to be working.
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|