Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7630147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:01:33+00:00 2026-05-31T06:01:33+00:00

I am using ordered list design to to make my twitter app to view

  • 0

I am using ordered list design to to make my twitter app to view the tweets. Every Time I call the ajax insert, it puts puts another copy of the ajax link on the page . I am just trying to get the next set of tweets from the controller and inserting them so it lines up. I have tried moving the tags around and but the additional ajax buttons keep showing up.

Thinking it was a css problem i stripped it all out. Wasnt the issue. I will have to reformat my list again to put the closing and openning tags before and after the code block.

I just tried to putting it in a partial view and I put the ajax code in the layout.

Ajax Action Link

       @Ajax.ActionLink("Update Tweets", "Index", "Home",
            new AjaxOptions
            {
                UpdateTargetId = "TweetBox",
                InsertionMode = InsertionMode.InsertBefore,
                HttpMethod = "Get",


            })

Partial View

   <div id="TweetBox">
    <div class="TwitterMessageBox">
    <ol>
        <li class="TweetLineBody">
            @foreach (var item in Model)
            {   

                @Html.Hidden(item.StatusId, item.StatusId)
                <div class="TwitProfileImage">
                    <img src=@Url.Content(item.ImageUrl) alt="@item.ScreenName" />
                </div>
                <div class="TwitRealName">
                    @item.User
                </div>
                <div class="TwitNickName">
                    @MvcHtmlString.Create(@Html.Namify(@item.ScreenName))
                </div>
                <div class="TweetText">
                    @MvcHtmlString.Create(@item.Tweet)</div>
                <div class="TweetTime">
                    @Html.RelativeDate(@item.Created)</div>
                <div class="TweetRating">
                    Rating</div>



            }
        </li>
       </ol>
     </div>
     </div>

The Controller is just a basic Enumerable List on the Home/ Index

This is the behavior

Lets say you have an ajax call that gets data from a controller action. It inserts before on a targetid thats a div id.

The initial view is perfect

AJAX UPDATE HTML LINK // You click it to get the controller invoke the ajax and get the data

Tweet 1

Tweet 2

etc = its perfect and aligned

You click the Ajax action link in your webpage, It goes out and gets the data but adds a second like like this

AJAX UPDATE HTML LINK

AJAX UPDATE HTML LINK

Tweet 1

Tweet 2 // alignment is still perfect but you have the 2nd ajax links

Now click the ajax link a 3rd time
// alignment is still perfect but you have the 2nd ajax link at top and one sandwiched

AJAX UPDATE HTML LINK

AJAX UPDATE HTML LINK

Tweet 1

Tweet 2
// alignment is still perfect but you have the 2nd ajax link at top and one sandwiched

Plus the Tweets results

AJAX UPDATE HTML LINK

Tweet 1

Tweet 2 // alignment is still perfect but you have the 2nd ajax links at the top and a 3rd List is inserted betweet 2/3

Controller Code per request:

public class HomeController : Controller
{
    //

    // GET: /Home/
    private TwitterContext twitterCtx;

    public ActionResult Index()
    {


        twitterCtx = new TwitterContext();

        List<TweetViewModel> friendTweets = (from tweet in twitterCtx.Status
                                             where tweet.Type == StatusType.Public
                                             select new TweetViewModel
                                             {
                                                 ImageUrl = tweet.User.ProfileImageUrl,
                                                 UserId = tweet.UserID,
                                                 User = tweet.User.Name,
                                                 ScreenName = tweet.User.Identifier.ScreenName,
                                                 StatusId = tweet.StatusID,
                                                 Tweet =     HomeController.AddWebAndTwitterLinks(tweet.Text),
                                                 Created = tweet.CreatedAt

                                             })
   .ToList();

        return View(friendTweets);
    }

My Desired Behavior is 1 ajax link to call the controller and the data inserts

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:01:35+00:00Added an answer on May 31, 2026 at 6:01 am

    Without seeing all the code, I can only assume you don’t have your views sorted out. Your controller appears to be returning the full Index view. If you put your tweet box into a partial view, your ajax action needs to be returning that partial view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a Un-ordered list using single <ul> .... </ul> How to
Using Python how do you reduce a list of lists by an ordered subset
Ok so I've ordered Applying Domain-Driven Design and Patterns: Using .Net , but while
I'm trying to create a instruction list using ordered lists (ol). Inside I want
Im using jQuery UI Selectable for list items in Ordered list, But i just
I currently have an ordered list that I want to markup using the new
I'm using the following Javascript code to populate a DIV with an ordered list:
I'm using authorize.net AIM, the sample code they provide prints an ordered list of
I'm using some Images in my WPF applcation. XAML: <Image Name=ImageOrderedList Source=images/OrderedList.png ToolTip=Ordered List
I'm using an ordered list in order to get numbering, which works perfectly fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.