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 909563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:53:57+00:00 2026-05-15T16:53:57+00:00

I have a website that returns search results from Twitter, written in C# ASP.NET.

  • 0

I have a website that returns search results from Twitter, written in C# ASP.NET. The search works very well.

When the user sees the results I want them to also have a ‘Next Page’ type hyperlink that will perform the search from the last previous result onwards (using Twitter’s next_page data).

How can I preserve properties so that when a link is clicked it will run the search again with different parameters for the next results? I cannot use Form as there is one Form on the page already and MS limits to one Form per page (for runat="server").

Please help, this is driving me nuts.

PS I thought of including code, but not sure which bit to include, as it has more to do with how ASP.NET works as much as how my own coding is.

  • 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-15T16:53:58+00:00Added an answer on May 15, 2026 at 4:53 pm

    There’s a hundred different ways to solve this problem. The ASP.NET infrastructure includes something called ViewState, which allows the page and its controls to persist arbitrary data and objects across page views.

    There is a single <form>, but you can have an unlimited number of links and buttons which submit the form in different ways – each one can trigger its own method when the page posts back.

    A simple way to leverage this in your case is to store the page parameter on the “next page” link. This is a very simple example that assumes you only need to know the page number, but it gets the point across:

    <asp:LinkButton runat="server" ID="next_page" Text="Next Page" OnClick="NextPage_Click" />
    

    …

    void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            LoadData(0);
        }
    }
    
    void LoadData(int page)
    {
        //pull page of data from twitter & show on page
        next_page.CommandArgument = (page+1).ToString();
    }
    
    void NextPage_Click(object sender, EventArgs e)
    {
        int page = int.Parse(((LinkButton)sender).CommandArgument);
        LoadData(page);
    }
    

    In this example we set the CommandArgument property of the LinkButton to the page index we want. The LinkButton triggers the NextPage_Click method to be called, and ASP.NET’s ViewState infrastructure allows the CommandArgument value is persisted.

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

Sidebar

Related Questions

I have an asp.net mvc website that returns a JSON result to certain pages
I'm using jQuery. I have website feature that does an ajax search and returns
Is there a twitter API that returns mood? I have seen some websites that
I have an ASP.Net MVC3 web application written in C#. I have one ActionResult
I have a website that utilizes MS SQL 2008's FTS (Full-Text Search). The search
I'm attempting to implement complete search functionality in my ASP.NET MVC (C#, Linq-to-Sql) website.
In my website I have a section where I generate HTML from a twitter
I am working on a mobile website in ASP.NET MVC3. I have a page
So basically I have website that has names of cities that can be checked
I have a website that is mainly based on JavaScript. It uses a REST

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.