Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. HOw to display the button id

HOw to display the button id

Scheduled Pinned Locked Moved ASP.NET
helptutoriallearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mri1a
    wrote on last edited by
    #1

    Hello I am a beginner and I really need hlp The problem is that :- I want to display the Button id of the button which has been clicked on a new page on being clicked and the text also i mean buton.text.

    Mrinal

    J 1 Reply Last reply
    0
    • M Mri1a

      Hello I am a beginner and I really need hlp The problem is that :- I want to display the Button id of the button which has been clicked on a new page on being clicked and the text also i mean buton.text.

      Mrinal

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      Do you mean that you want to pass the button ID and TEXT to the new page on the click of a Button? If yes... On the button click event use Reponse.Redirect to call the new page. Along wi the page URL you can pass the button ID and TEXT as query string values. something like this... Response.Redirect("NewPage.aspx?btnId=" + btn.ID + "&btntext=" + btn.Text, False) and In the New page you can retrieve the values using Request object. Request.QueryString("btnId") Request.QueryString("btntext") the above statement will give you the vaues that you passed from the actual page.

      Regards
      J O H N :rose:
      "Even eagles need a push." David McNally


      M 1 Reply Last reply
      0
      • J John ph

        Do you mean that you want to pass the button ID and TEXT to the new page on the click of a Button? If yes... On the button click event use Reponse.Redirect to call the new page. Along wi the page URL you can pass the button ID and TEXT as query string values. something like this... Response.Redirect("NewPage.aspx?btnId=" + btn.ID + "&btntext=" + btn.Text, False) and In the New page you can retrieve the values using Request object. Request.QueryString("btnId") Request.QueryString("btntext") the above statement will give you the vaues that you passed from the actual page.

        Regards
        J O H N :rose:
        "Even eagles need a push." David McNally


        M Offline
        M Offline
        Mri1a
        wrote on last edited by
        #3

        Thanks.. I have 4 buttons on my page .It worked for the first button but didn't work for the rest others ..

        Mrinal

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups