You have to use an asp:Image control, with ImageUrl property set to the
priority icon file. You can then show and hide the image according to the
priority.
private void ShowPriority()
{
StorePriority.Value = "n";
myLabel.Text = StorePriority.Value;
yourImage.ImageUrl = "....";
if(myLabel.Equal("n");
{
myLabel.Text = " ";
yourImage.Visible = false;
}
else
{
yourImage.Visible = true;
}
Sarath Babu S
http://www.consultsarath.com
"bthumber" <> wrote in message
news:C7F824BC-7D62-49E6-B7E1-...
> How do you made a reference to an image in the code behind? I'm trying to
> show a high priority "!" image if an "h" was in the label. Please the
> code
> below.
>
> view plaincopy to clipboardprint?
> private void ShowPriority()
> {
> StorePriority.Value = "n";
> myLabel.Text = StorePriority.Value;
> if(myLabel.Equal("n");
> {
> myLabel.Text = " ";
> }
> else
> {
> // How do reference the path to the image?
> }