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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:57:31+00:00 2026-06-06T08:57:31+00:00

I have a website in c#, in the first page I have some listbox,

  • 0

I have a website in c#, in the first page I have some listbox, I need that
the last user’s choice goes to a label in other page, how can I do that?

In my code if
the user chooses a value a button is visible, and in the click event of that button
redirect to to another page, but I need that value in a label in the page2

if (ddlFunciones.SelectedValue.Equals("15"))
{
    lblAgregarNuevoServicio.Visible = true;
    //lblIdFuncion.Visible = true;
    lblDescripcion.Visible = true;
    //txtId_funcion.Visible = true;
    txtDescripcionFuncion.Visible = true;
    btnAgregarNuevaFuncion.Visible = true;
}


protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{

}
protected void btnVerCargos_Click(object sender, EventArgs e)
{
    if (btnVerCargos.Enabled)
    {
        ListBoxCargo.Visible = true;
    }
    else
    {
        ListBoxCargo.Visible = false;
    }
}
protected void ListBoxCargo_SelectedIndexChanged(object sender, EventArgs e)
{

}
  • 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-06-06T08:57:33+00:00Added an answer on June 6, 2026 at 8:57 am

    If this is in Asp.Net you can pass information between pages in a number of ways.
    You can use the Session object

    protected void ListBoxCargo_SelectedIndexChanged(object sender, EventArgs e)
    {
       Session["MyVar"] = ListBoxCargo.SelectedValue;
    }
    

    and in your other page

    object value;
    if (Session["MyVar"] != null)
    {
       value = Session["MyVar"]
    }
    

    OR

    By passing them in the QueryString see Passing-variables-between-pages-using-QueryString
    And using Request.QueryString["MyVar"]

    and of course there are more, please explain what exactly are you trying to do…

    Edit: Based on OPs comments:

    In page1:

    protected void Button1_Click(object sender, EventArgs e)
        {
            Session["Page1Value"] = ListBox3.SelectedItem.Text;
           //Response.Redirect("~/Page2.aspx");
        }
    

    In Page2:

     protected void Page_Load(object sender, EventArgs e)
     {
        if (Session["Page1Value"] != null)
        {
           Label1.Text = Session["Page1Value"].ToString();
        }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website with a URL like: http://mysite.com/this-is-a-page and then I use that
I'm building a website which has a page that users can add content to,
I have some method that is invoked on Application_Start. And it starts on first
I am developing a website by ASP.Net. I have created settings/first-run page which I
We are using our first website that will give the users the choice of
I have just uploaded my first 'website' (html+js) to a web server, and my
I'm building my first MVC3 website and have connected my site to a mdf
I have been editing a WordPress website for the first time and now I
I have my first professional assignment of making a website in which a photographer's
I am working on ASP.Net 2.0 website and I have a strange problem. First

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.