passing parameter through navigateUrl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AmiMitra
    New Member
    • Apr 2009
    • 24

    passing parameter through navigateUrl

    i am having problem with passing parameter through navigateUrl property of a hyperlink.
    in the page where i am using the hyperlink , i am getting the data thorugh commonutility. i want to pass this data to the next page through navigateUrl. plz help.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    append the ?name=value&nam e=value to the url and then parse them on your next page?

    Comment

    • AmiMitra
      New Member
      • Apr 2009
      • 24

      #3
      i am getting the value in the code behind, in the .cs page. how can i use that variable in the aspx page?? the value is coming from the previous page.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Well the code page BUILDS the aspx page, so if you have the value in the code section, just change a value on your aspx page?

        Comment

        • AmiMitra
          New Member
          • Apr 2009
          • 24

          #5
          let me explain. i have a page where a bulleted list exists , with the list items as hotel, car , flight , railways.
          each list item is hyperlinked to the booking form.
          the parameters to pass are name of the place and booking type.
          passing the booking type is not a problem.
          but the name of the place comes from the previous page.
          i get it by the code
          string placename = commonutility.g etQueryStringVa lue("placename" );
          in the .cs page.
          how can i pass this value in the current page?
          plz tell me with necessary code.

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Write it out to the links in your bulleted list?
            What custom libraries are you using that you have a "commonutil ity" object?

            Comment

            • AmiMitra
              New Member
              • Apr 2009
              • 24

              #7
              well, i solved it. i think i should post it here so that someone else can be helped.

              i used the following code in the .cs page

              bl1.items.add( new listitem( "hotel", "page.aspx? aa"+ bb));

              bl1 is the id of the bulleted list.

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                Yup, just put it in the link. (See my first post)

                Comment

                Working...