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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:36:27+00:00 2026-05-25T14:36:27+00:00

I have an OnClick event for my Pushpins as below. void BusStop1061_MouseLeftButtonUp(object sender, MouseButtonEventArgs

  • 0

I have an OnClick event for my Pushpins as below.

void BusStop1061_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
    MessageBox.Show("Buses from this station: City Link");
}

I would like to pass the bustop number to another page and to the int “PassedVariable”

private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
    string site = "http://www.sourceDomain?stop=" + PassedVariable;
    webBrowser1.Navigate(new Uri(site, UriKind.Absolute));

}

I was thinking of creating a constant int on the Page one, then passing it to page 2 using urimapping, but it doesn’t seem to work and I figured someone might have a better option

I have had a look at similar posts, but they dont quite answer my question.

  • 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-25T14:36:27+00:00Added an answer on May 25, 2026 at 2:36 pm

    There are multiple ways to achieve this.

    One way, is to create a BustopNumber property in the App.xaml.cs class, a set it in one page, and access it else where.

    This is my preferred approach, although you have to guard against the case where the value isn’t set or invalid.

    Another approach is to pass it in as a query string parameter, similar to what you are doing in your code snippet above. In the navigated to page, you can access the query string parameter via the NavigationContext object and look for by name.

    Edit to add:

    public partial class App : Application
    {
        public static int BusStopNumber { get; set;}
    }
    
    //And in your application you can access it like so:
    App.BusStopNumber = 10;
    

    Obviously there are issues with encapsulation, as this is essentially a hack for global, but if used carefully, can offer a quick and easy way to share information across multiple pages.

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

Sidebar

Related Questions

I have a onclick event that is like: public void OnMyButton_Click(object sender, EventArgs e)
I have a div which I have attached an onclick event to. in this
I have an asp button with no onclick event but only onclientclick. This call
I have a function that gets called from an onclick event for example <a
I need to have a handler on the calling object of onclick event. <a
I have the following onclick event for a button. once this event is ftonired
I am coming from asp.net and in asp.net you have the onclick event that
On Window 's load, every DD element inside Quote_App should have an onCLick event
I have a gridview control that has on onclick event bound to every cell.
I have a strange problem where an onclick event on an input image is

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.