I am trying to incorporate a responsive jquery input control for inputting blogs, which will be saved to database, from then retrieved to web form page.

I am facing issues with the input text control as entries made through it are hijacking my blog slider itself when I render them through repeater in the front page of my website.

When I derive simple plain textx it works fine, when I even derive this HTML encoded text also it works fine but the moment I add .ToSubstring() function to the eval method it starts acting up, breaks down my slider itself. conflict ?

Here is my code

<%#System.Web.HttpUtility.HtmlDecode(Eval("Content").ToString().Substring(0,180)) %>

Here is the HTML Encoded text

<div class="MsoNormal" style="text-align: justify;">Our last pilgrimage to <a href="http://www.sigandur.in/" target="_blank">Sri Chowdeshwari Temple</a> at Sigandhur (Karnataka) was in <a href="http://kartourism.blogspot.com/2009/01/sigandhur-tourism.html">2009</a>. It was time to revisit the temple and offer our prayers. We knew very well about the perils of visiting the temple on a holiday, yet we undertook the pilgrimage as we had a packed schedule.</div>



This is how slider breaks when added with .ToSubstring() method Slider

Can anyone help me in solving this problem ? or suggest me a better text input control, which doesn't conflict with users code. Thank you

Here is my slider code too

<div class="col-md-6" style="height: 260px; background-color: #EEEEEE">
    <h3 style="text-align: center; font-weight: bold;">Blogging my Thoughts <span>
        <img style="height: 35px; width: 35px" src="images/home/pen.png" />

    <div id="carousel-example" class="carousel slide" data-ride="carousel">

        <div class="carousel-inner">
            <asp:Repeater ID="RepDetails" runat="server">
                    <div class="item <%# (Container.ItemIndex == 0 ? "active" : "") %>">
                        <div class="testimonial-section">

                            <h3 runat="server" id="fh"><%#Eval("Heading") %></h3>
                            <p runat="server" id="fp">
                                <%#System.Web.HttpUtility.HtmlDecode(Eval("Content").ToString().Substring(0,180)) %>

                            <br />
                            <a href='<%#String.Format("{0}", Eval("Seo"))%>' style="font-weight: bold; font-size: 16px">Continue Reading </a>


            <ol class="carousel-indicators carousel-indicators-set">
                <li data-target="#carousel-example" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-example" data-slide-to="1"></li>
                <li data-target="#carousel-example" data-slide-to="2"></li>




Related posts

Recent Viewed