locked
Read more... RRS feed

  • Question

  • User-209869480 posted

    Hello everybody,

    how to add a read more (or details, etc) link in my site?

    Thanks in advance,

    Dimitris

    Monday, July 1, 2013 5:10 AM

Answers

  • User516094431 posted

    check below link, it's already implemented.

    http://stackoverflow.com/questions/6012942/how-to-limit-label-string-length-in-gridview-with-read-more-link

    thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 5:14 AM
  • User-821857111 posted

    You can use an extension method like this one: http://www.mikesdotnetting.com/Article/137/Displaying-The-First-n-Characters-Of-Text. Note that if you want to use it on a value from a database, you should cast the value to a string before you can use the extension method on it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 6:00 AM
  • User-209869480 posted

    First of all thanks for your replies.

    That was what I was looking for...

    <script language="javascript">
        function showOrHide() 
        {
            var div = document.getElementById("showOrHideDiv");
            if (div.style.display == "block") 
            {
                div.style.display = "none";
            }
            else 
            {
                div.style.display = "block";
            }
        }
    
    </script>
    <br/>
    
    
    <p>
    In this tutorial you will learn how to hide multiple div elements with only one action (for example click on button).
    </p>
    <a href="javascript:showOrHide();">more details...</a>
    <div id="showOrHideDiv" style="display: none">
    <p>
     To hide or show HTML elements javascript is used. Usually for hiding and showing HTML elements, HTML elements are placed in one div tag and this div tag is hided or showed with a help of javascript.
    </p>
    </div>



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 2:28 PM

All replies

  • User516094431 posted

    check below link, it's already implemented.

    http://stackoverflow.com/questions/6012942/how-to-limit-label-string-length-in-gridview-with-read-more-link

    thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 5:14 AM
  • User-209869480 posted

    I use .cshtml pages (razor syntax in webmatrix) css and javascripts

    Monday, July 1, 2013 5:51 AM
  • User-821857111 posted

    You can use an extension method like this one: http://www.mikesdotnetting.com/Article/137/Displaying-The-First-n-Characters-Of-Text. Note that if you want to use it on a value from a database, you should cast the value to a string before you can use the extension method on it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 6:00 AM
  • User-209869480 posted

    First of all thanks for your replies.

    That was what I was looking for...

    <script language="javascript">
        function showOrHide() 
        {
            var div = document.getElementById("showOrHideDiv");
            if (div.style.display == "block") 
            {
                div.style.display = "none";
            }
            else 
            {
                div.style.display = "block";
            }
        }
    
    </script>
    <br/>
    
    
    <p>
    In this tutorial you will learn how to hide multiple div elements with only one action (for example click on button).
    </p>
    <a href="javascript:showOrHide();">more details...</a>
    <div id="showOrHideDiv" style="display: none">
    <p>
     To hide or show HTML elements javascript is used. Usually for hiding and showing HTML elements, HTML elements are placed in one div tag and this div tag is hided or showed with a help of javascript.
    </p>
    </div>



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 1, 2013 2:28 PM