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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Pass the value from one page to another page.....

Pass the value from one page to another page.....

Scheduled Pinned Locked Moved ASP.NET
question
8 Posts 2 Posters 1 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.
  • P Offline
    P Offline
    Prabs frm PGP
    wrote on last edited by
    #1

    Hi! I want to pass the value from one page to another page: In my maker page i used datagrid and i hv to take that dg's row value (through., DataRowView) i transfered that value to nxt page: Here in ItemDataBound event i wrote the coding for get the values to the DG's Row.. here i retrieve the value frm the DAtaRowView in a variable in a name as temp. In ItemCommand Event i wroth that Response.Redirect("Models.aspx") Now this temp value also transfer to that Models Page.., I tried the QueryString like: Response.Redirect("Makers1.aspx?val="+temp); but its in Item Command event., but that value in ItemDataBound Command so., It assigns only null value to that one.., Here i can't use session also... How can we solve this one...? T.Prabu T.Prabu

    _ 1 Reply Last reply
    0
    • P Prabs frm PGP

      Hi! I want to pass the value from one page to another page: In my maker page i used datagrid and i hv to take that dg's row value (through., DataRowView) i transfered that value to nxt page: Here in ItemDataBound event i wrote the coding for get the values to the DG's Row.. here i retrieve the value frm the DAtaRowView in a variable in a name as temp. In ItemCommand Event i wroth that Response.Redirect("Models.aspx") Now this temp value also transfer to that Models Page.., I tried the QueryString like: Response.Redirect("Makers1.aspx?val="+temp); but its in Item Command event., but that value in ItemDataBound Command so., It assigns only null value to that one.., Here i can't use session also... How can we solve this one...? T.Prabu T.Prabu

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      You can use command argument property to first set the value and then in itemcommand event you can access that value and use it.

      Best Regards, Apurva Kaushal

      P 1 Reply Last reply
      0
      • _ _AK_

        You can use command argument property to first set the value and then in itemcommand event you can access that value and use it.

        Best Regards, Apurva Kaushal

        P Offline
        P Offline
        Prabs frm PGP
        wrote on last edited by
        #3

        Can you let me know abt that command argument?...

        _ 1 Reply Last reply
        0
        • P Prabs frm PGP

          Can you let me know abt that command argument?...

          _ Offline
          _ Offline
          _AK_
          wrote on last edited by
          #4

          suppose you are having an image button whose click event you are trying to capture in itemcommand event, then that image button will be having a property called command argument which you can set in the item bound event of the datagrid. And in itemcommand event you can access that command argument property, it will give you the corresponding value of that row.

          Best Regards, Apurva Kaushal

          P 1 Reply Last reply
          0
          • _ _AK_

            suppose you are having an image button whose click event you are trying to capture in itemcommand event, then that image button will be having a property called command argument which you can set in the item bound event of the datagrid. And in itemcommand event you can access that command argument property, it will give you the corresponding value of that row.

            Best Regards, Apurva Kaushal

            P Offline
            P Offline
            Prabs frm PGP
            wrote on last edited by
            #5

            Hi Apurva., I am newer. i want toretrieve that imagebutton's imageurl wheich is in the datagrid. I can retrieve that value only in databound event using datarowview... I want to pass this value to next page... In item command event only i can use response.redirect... with the query string.. I tried as u say, commandargument in itemcommand event it shows only the null value.., If possible send me the sample coding..., And also for the Paging in datalist also... Thanks & Regards!.. T.Prabu

            _ 1 Reply Last reply
            0
            • P Prabs frm PGP

              Hi Apurva., I am newer. i want toretrieve that imagebutton's imageurl wheich is in the datagrid. I can retrieve that value only in databound event using datarowview... I want to pass this value to next page... In item command event only i can use response.redirect... with the query string.. I tried as u say, commandargument in itemcommand event it shows only the null value.., If possible send me the sample coding..., And also for the Paging in datalist also... Thanks & Regards!.. T.Prabu

              _ Offline
              _ Offline
              _AK_
              wrote on last edited by
              #6

              suppose you are having an image button in a template column of datagrid, then this code you have to put in your onitembound event: ImageButton ii = (ImageButton)e.Item.FindControl("imgbtn"); ii.CommandArgument=drv[0].ToString(); here drv[0] is datarowview and the value which you need to put. And in itemcommand event you can retrieve that value like this: string str = e.CommandArgument.ToString();

              Prabs frm PGP wrote:

              And also for the Paging in datalist also...

              For custom paging you can get so much of article on net. you just need to search through google.

              Best Regards, Apurva Kaushal

              P 1 Reply Last reply
              0
              • _ _AK_

                suppose you are having an image button in a template column of datagrid, then this code you have to put in your onitembound event: ImageButton ii = (ImageButton)e.Item.FindControl("imgbtn"); ii.CommandArgument=drv[0].ToString(); here drv[0] is datarowview and the value which you need to put. And in itemcommand event you can retrieve that value like this: string str = e.CommandArgument.ToString();

                Prabs frm PGP wrote:

                And also for the Paging in datalist also...

                For custom paging you can get so much of article on net. you just need to search through google.

                Best Regards, Apurva Kaushal

                P Offline
                P Offline
                Prabs frm PGP
                wrote on last edited by
                #7

                Hi! Thanks Apurva... I got the solution with the help of u.. Thanks., Bye..., T.Prabu

                _ 1 Reply Last reply
                0
                • P Prabs frm PGP

                  Hi! Thanks Apurva... I got the solution with the help of u.. Thanks., Bye..., T.Prabu

                  _ Offline
                  _ Offline
                  _AK_
                  wrote on last edited by
                  #8

                  always welcome.... :)

                  Best Regards, Apurva Kaushal

                  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