Loading ...

Strange Behaviour in asp.net validator

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  web forms / data controls   » Strange Behaviour in asp.net validator

Strange Behaviour in asp.net validator

Posts under the topic: Strange Behaviour in asp.net validator

Posted: 4/9/2009

Lurker 14  points  Lurker
  • Joined on: 4/9/2009
  • Posts: 2
  Answered

there is a strange behaviour, during server postback the validation control will show the image area but not the image... The image is in right path...

there is a complex ajax asp.net control which is used in one more asp.net control which need to be validated
just below the complex ajax asp.net control we have custom validator
            <asp:CustomValidator ID="validator1" Display="Dynamic" ErrorMessage="Required!"  Runat="server" >
   <img src='/../Images/Failed.gif' height='16' width='16' alt='Required!' />
   </asp:CustomValidator>
in the code behind in the isvalid property
validator1.IsValid = is set to true or false based on some condition...

when validator1.IsValid is false then this image should be displayed, but it will display only the image area
actual image is not shown
we also feel that this may not be related to ajax control...
we checked in the net but no answers for this
any one come across this problem earlier ?


Posted: 4/9/2009

Lurker 14  points  Lurker
  • Joined on: 4/9/2009
  • Posts: 2

it was path problem,  but in aspx code editor in visual studio 2005 it shows invalid path/Path Not Found after correcting, when we run it, it will displays the image when validated.

  <img src='Images/Failed.gif' height='16' width='16' alt='Required!' />

one more thing I would like to highlight is invalid path/Path Not Found happens when the IIS Virtual Diectory Image Folder Path is diffrent from the path defined in Visual Studio Solution.


Page 1 of 1 (2 items)