Click here to Skip to main content
15,886,720 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
my html code
XML
<div class="errorList">
    <div class="errorListDetails">
    <ul>
<li>No customers meet the specified criteria</li>

    </ul>
    </div><!-- errorListDetails -->
</div>
Posted
Updated 26-Feb-15 16:04pm
v3
Comments
Mohibur Rashid 26-Feb-15 22:36pm    
regular expression can be an answer.
Member 10371894 26-Feb-15 22:54pm    
i need to check whether <li> contains the string No customers meet the specified criteria
Mohibur Rashid 26-Feb-15 23:41pm    
one solution can be, if you are using jquery
$("div.errorListDetails>ul>li").html()=="No customers meet the specified criteria"?alert(true):alert(false);
if you are not using jquery but native javascript:
document.querySelector("div.errorListDetails").querySelector("ul").querySelector("li").innerHTML=="No customers meet the specified criteria"?alert(true):alert(false);

this is not a well designed work method to verify whther user is selected or not. you better set an hidden field containing true or false, which will inform whether user is selected or not. A simple Example would be, if you making the application for multiple language you algorithm will suffer.
Member 10371894 26-Feb-15 23:47pm    
is there any way which i can write it in web browser document completed event in C#?
Mohibur Rashid 27-Feb-15 0:05am    
neither an expert nor a fan of C#

1 solution

You can use $(document).ready() to perform javascript after the page loads.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900