user2931015
user2931015

Reputation: 219

images not visible in form

i want to show images not visible in form ..

code

  <div><img id="imgsuces" src="images/sucess.jpg" visible="false" alt="success" />
 <asp:Label runat="server" id="StatusLabel" />
</div>
<div><img id="imgfalied" src="images/falied.jpg" visible="false" alt="success" />
 <asp:Label runat="server" id="Label2" />
</div>

i add this in upload form then when i run this form then this images are visible ...but i want when user upload document and when it success the image will be shown of sucess and when document failed then image will be show falied .

how i get it?

Upvotes: 0

Views: 76

Answers (2)

Murali Murugesan
Murali Murugesan

Reputation: 22619

If you want to do some manipulation in server side(visible="false") add runat=server

<img id="imgfalied" src="images/falied.jpg" visible="false" 
     runat='server' alt="success" />

Or make it in client side using style="display:none"

<img id="imgfalied" src="images/falied.jpg"  
     style="display:none" alt="success" />

Upvotes: 2

Stinky Towel
Stinky Towel

Reputation: 778

Add runat=server in the img tags and set the visibility from the code behind.

Upvotes: 1

Related Questions