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

  • Home
  • SEARCH
  • 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 7810755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:54:24+00:00 2026-06-02T03:54:24+00:00

I’ve been struggling with this issue for a whole day now and I don’t

  • 0

I’ve been struggling with this issue for a whole day now and I don’t seem to find an answer.

I have a page called PickRecord.aspx where I have dynamically generated columns “Start Interview”, “Edit” and “View Record” which will redirect me to the StartInterview.aspx or EditViewInterview.aspx accordingly.

PickRecord.aspx – The GridView is populated with Interviewee names and a button is generated which when clicked on should redirect me to StartInterview.aspx and give me other fields/information in the record selected.

StartInterview.aspx – Contains additional information on the record chosen which needs to be populated with data from the database. I have tried query string, used selectedIndexChanged and had no luck.

Woul’d really appreciate it if somebody can guide me through this. Thanks in advance!

PickRecord.aspx


<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Height="470px" Width="660px" HorizontalAlign="Center" SelectedIndexChanged="GridView1_SelectedIndexChanged">

    <Columns>   
        <asp:BoundField DataField="First_Name" HeaderText="First Name" ItemStyle-HorizontalAlign = "Center">    
        </asp:BoundField>   

        <asp:BoundField DataField="Last_Name" HeaderText=" Last Name" ItemStyle-HorizontalAlign = "Center" >    
        </asp:BoundField>   

        <asp:BoundField DataField="Salon_Number" HeaderText="Salon" ItemStyle-HorizontalAlign = "Center" >  
        </asp:BoundField>   

    </Columns>  
</asp:GridView> 

PickRecord.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data.SqlClient;
using System.Data;

namespace TSS.Trainer
{

    public partial class Trainer_PickRecord : System.Web.UI.Page
    {
    static string id;


    protected void Page_Load(object sender, EventArgs e)
    {
        dbConnection dbConn = new dbConnection();
        string s = Request.QueryString["mode"].ToString();

        if (!IsPostBack)
        {
            FillMonth(ddl_T_month);
            FillYear(ddl_T_year);
        }

        if (s == "a")
        {

            TemplateField tf1 = new TemplateField();
            tf1.ItemTemplate = new btntemplate1();
            tf1.HeaderText = "Start Interview";
            tf1.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
            GridView1.Columns.Add(tf1);

            DataTable dtInterviewee = new DataTable();
            dtInterviewee = Salon_WebService.populateInterviewee();
            GridView1.DataSource = dtInterviewee;
            GridView1.DataBind();
        }

        else if (s == "b")
        {
            TemplateField tf2 = new TemplateField();
            TemplateField tf3 = new TemplateField();
            tf2.ItemTemplate = new btntemplate2();
            tf3.ItemTemplate = new btntemplate3();
            tf2.HeaderText = "Edit";
            tf3.HeaderText = "View";
            tf2.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
            tf3.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
            GridView1.Columns.Add(tf2);
            GridView1.Columns.Add(tf3);

            DataTable dtInterviewee = new DataTable();
            dtInterviewee = Salon_WebService.populateInterviewee();
            GridView1.DataSource = dtInterviewee;
            GridView1.DataBind();
        }

         void GridView1_SelectedIndexChanged(object sender, EventArgs e)
         {
            GridViewRow row = GridView1.SelectedRow;
            id = row.Cells[0].Text;
         }

    }



    class btntemplate1 : ITemplate
    {

        public void InstantiateIn(System.Web.UI.Control container)
        {

            HyperLink h1 = new HyperLink();
            h1.NavigateUrl = "Trainer_StartInterview.aspx?x= " +id;
            h1.ImageUrl = "../Images/T_StartIV_small.png";
            container.Controls.Add(h1);
        }
    }


    class btntemplate2 : ITemplate
    {
        public void InstantiateIn(System.Web.UI.Control container)
        {

            HyperLink h2 = new HyperLink();
            h2.NavigateUrl = "Trainer_Home.aspx";
            h2.ImageUrl = "../Images/Edit_small.png";

            container.Controls.Add(h2);

        }
    }

    class btntemplate3 : ITemplate
    {
        public void InstantiateIn(System.Web.UI.Control container)
        {
            HyperLink h3 = new HyperLink();
            h3.NavigateUrl = "Trainer_ViewRecord.aspx";
            h3.ImageUrl = "../Images/View_small.png";

            container.Controls.Add(h3);
        }
    }
}

}

StartInterview.aspx

<div id="T_StartInterview_formHeader" class="fh2">
        <center>
            <table>
                <tr>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblCreate_Date" runat="server" Text="Create Date : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="LabelCD" runat="server" Text="December 05, 2011 "></asp:Label>
                    </td>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblUpdate_Date" runat="server" Text="Update Date : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUD" runat="server" Text="December 09, 2011 "></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblCreatedBy" runat="server" Text="Created By : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblCB" runat="server" Text='<%# Eval ("First_Name") %>' class="lblSizeR"></asp:Label>
                    </td>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblUpBy" runat="server" Text="Updated By : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUB" runat="server" Text="Sharon Miller " class="lblSizeR"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblFName" runat="server" Text="First Name : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblFN" runat="server" Text="Michelle"></asp:Label>
                    </td>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblLName" runat="server" Text="Last Name : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblLN" runat="server" Text="Rusk"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblPhone" runat="server" Text="Phone : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblPh" runat="server" Text="269 123 1234"></asp:Label>
                    </td>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblEmail" runat="server" Text="E-Mail : "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblMail" runat="server" Text="xyz@visiblechanges.com" class="lblSizeR"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; color: white">
                        <asp:Label ID="lblSalon" runat="server" Text="Salon: "></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblSal" runat="server" Text="Memorial City Mall" class="lblSizeR"></asp:Label>
                    </td>
                </tr>
            </table>

Trainer_StartInterview.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TSS.Trainer
{
public partial class Trainer_StartInterview : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string s = Request.QueryString["id"].ToString();
    }
}

}

  • 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-06-02T03:54:25+00:00Added an answer on June 2, 2026 at 3:54 am

    You haven’t mentioned the exact issue, but if you are not even hitting StartInterview.aspx page then I would advice you to remove the complicated instantiated in code and replace it with a simple template based column having a button or even a button column. You can check this link for the implementation : Redirect to specific page when a gridview buttonfield is clicked

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have been unable to fix a problem with Java Unicode and encoding. The
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.