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 show the previous selected checked box in previous page in asp.net

How to show the previous selected checked box in previous page in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelptutorial
4 Posts 3 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.
  • A Offline
    A Offline
    Arun kumar Gautam
    wrote on last edited by
    #1

    I m making an online examination page on this page i created a gridview with paging when i go on next page thn aftr selecting options of answer of any question i m going on to another page. but when i come back on this previous page i cant see the previously selected answers the gridview page is refreshed thn, Please help me in it.

    <body>

    <label id="tim" style="font-size:15px;"></label>
    
    
    
    
    </body>
    

    and here is my c# code in gridview paging

    protected void examgrid_RowCommand(object sender, GridViewCommandEventArgs e)
    {
    DBClass db = new DBClass();

        //hidvalue.Value = Convert.ToString(x);
        for (int i = 0; i < examgrid.Rows.Count; i++)
        {
            Label question = (Label)examgrid.Rows\[i\].Cells\[0\].FindControl("ques");
    
    S 1 Reply Last reply
    0
    • A Arun kumar Gautam

      I m making an online examination page on this page i created a gridview with paging when i go on next page thn aftr selecting options of answer of any question i m going on to another page. but when i come back on this previous page i cant see the previously selected answers the gridview page is refreshed thn, Please help me in it.

      <body>

      <label id="tim" style="font-size:15px;"></label>
      
      
      
      
      </body>
      

      and here is my c# code in gridview paging

      protected void examgrid_RowCommand(object sender, GridViewCommandEventArgs e)
      {
      DBClass db = new DBClass();

          //hidvalue.Value = Convert.ToString(x);
          for (int i = 0; i < examgrid.Rows.Count; i++)
          {
              Label question = (Label)examgrid.Rows\[i\].Cells\[0\].FindControl("ques");
      
      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      Generally the implementation is to rebind the grid on page change that leads to loss of any selection made. If you want to persist selection across various pages, you need to maintain the selection somewhere or use client side pagination avoiding rebind on page change. Following article demonstrates one of the ways to handle it: Maintaining States of Selected CheckBoxes in Different Pages inside the GridView[^]

      Sandeep Mewara Microsoft ASP.NET MVP 2012 [My Latest Article(s)]: How to extend a WPF Textbox to Custom Picker Server side Delimiters in ASP.NET

      A 1 Reply Last reply
      0
      • S Sandeep Mewara

        Generally the implementation is to rebind the grid on page change that leads to loss of any selection made. If you want to persist selection across various pages, you need to maintain the selection somewhere or use client side pagination avoiding rebind on page change. Following article demonstrates one of the ways to handle it: Maintaining States of Selected CheckBoxes in Different Pages inside the GridView[^]

        Sandeep Mewara Microsoft ASP.NET MVP 2012 [My Latest Article(s)]: How to extend a WPF Textbox to Custom Picker Server side Delimiters in ASP.NET

        A Offline
        A Offline
        Arun kumar Gautam
        wrote on last edited by
        #3

        thnks bro

        A 1 Reply Last reply
        0
        • A Arun kumar Gautam

          thnks bro

          A Offline
          A Offline
          anubhaw gupta
          wrote on last edited by
          #4

          If i have to give an opinion,i'll say that use javascript to store the value corresponding to the question no and show that everytime. By default keep nothing in the radiobutton. Hope this helps.

          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