Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I would like to know how to use the hr whenever required for. How to give an ID to it.
My code:

CSS
<asp:hr id="hrcityleft" runat="server"
                hr style="z-index: 1; left: 240px; top: 195px; position: absolute; height: 0px;  width: 299px; background-color:Silver; "
               />


It is not working. Says: 'Unknown server tag asp:hr'.
Posted
Comments
[no name] 17-Jan-13 6:59am    
<hr runat="server" id="hrStyle" /> works.....

there's no tag like asp:hr to my knowledge
[no name] 17-Jan-13 7:00am    
server side

hrStyle.visible = false; or hr.style.add("display","none|block");

Hello
You can used like this
<hr runat="server" id="hr" style="z-index: 1; left: 240px; top: 195px; position: absolute; height: 0px;  width: 299px; background-color:Silver; " />
 
Share this answer
 
hi,

use this simple methoed-

C#
function showORhide(obj) {
           if ($('#' + obj).length > 0) {
               if ($('#' + obj)[0].style.display == 'none') {
                   $('#' + obj).css('display', 'block');
               }
               else {
                   $('#' + obj).hide();
               }
           }
       }


with your code like -
XML
<div id="divHr" style="display: none;">
                       <hr />
                   </div>
                   <input type="button" value="submit" onclick="showORhide('divHr')" />



it might help you
 
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