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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:16:52+00:00 2026-05-30T14:16:52+00:00

I have a gridview which displays the records in the below form: Date Total

  • 0

I have a gridview which displays the records in the below form:

Date                    Total Enrolled  Enrolled as Email   Enrolled as Text   
2/29/2012 12:00:00 AM   1               0                   1   
2/28/2012 12:00:00 AM   2               1                   1   
2/27/2012 12:00:00 AM   23              11                  12   
2/25/2012 12:00:00 AM   1               1                   0   
2/24/2012 12:00:00 AM   16              9                   7   

Which displays the record using this query:

select created,
count(field1) Enrolled,
count(case field1 when 'E-mail' then 1 end) Enrolled_as_Email,
count(case field1 when 'Cell Phone' then 1 end) Enrolled_as_Cell,
(Select COUNT(*)
from tbl_TransactionDishout d
where d.created = c.created and
       d.DishoutResponseCode = '0000') Deals_Redeemed
from tblCustomer c
group by created
order by created

ASP.NET Code is as below:

  <asp:GridView ID="GrdReport" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" CellPadding="1" DataKeyNames="Created" DataSourceID="SqlDataSource1"
                ForeColor="#333333" GridLines="None" PageSize="100" 
                onrowdatabound="GrdReport_RowDataBound">
                <Columns>
                    <asp:BoundField DataField="Created" HeaderText="Date" SortExpression="Created" />
                    <asp:BoundField DataField="Total_Enrolled" HeaderText="Total Enrolled" SortExpression="Total_Enrolled" />
                    <asp:BoundField DataField="Enrolled_as_Email" HeaderText="Enrolled as Email" SortExpression="Enrolled_as_Email" />
                    <asp:BoundField DataField="Enrolled_as_Cell" HeaderText="Enrolled as Text" SortExpression="Enrolled_as_Cell" />
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#EFF3FB" Height="4" />
                <EditRowStyle BackColor="#2461BF" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Right" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ appSettings:DBConn %>"
                SelectCommand="select created, count(field1) Total_Enrolled, count(case field1 when 'E-mail' then 1 end) Enrolled_as_Email, count(case field1 when 'Cell Phone' then 1 end) Enrolled_as_Cell from tblCustomer group by created order by created desc">
            </asp:SqlDataSource>    

Now I want the number to be a hyperlink which redirect the page to some other page where it displays those records..
So how should it be done.?? What should I pass in query string such that I can recognize it on the redirected page..and how?

  • 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-05-30T14:16:54+00:00Added an answer on May 30, 2026 at 2:16 pm

    your linke would look like this…

    http://address/page.aspx?parameter=value&nextparameter=value

    http://localhost/newpage.aspx?email=0&text=1

    in your asp.net page you can access query string like this

    Request.QueryString["email"];
    
    Request.QueryString["text"];
    

    This is only one easy approach… If you build complex webapps you should take of more but this could get you started

    if I have understand your question correct…

    You should make sure that you encode the values to make them html safe…

    EDIT: to construct your link use hyperlinkfield

    <asp:hyperlinkfield datatextfield="UnitPrice"
            datatextformatstring="{0:c}"
            datanavigateurlfields="ProductID"
            datanavigateurlformatstring="~\details.aspx?ProductID={0}"          
            headertext="Price"
            target="_blank" />
    

    to use multiple parameters comma seperate them like this

        <asp:HyperLinkField DataTextField="CategoryName" 
    DataNavigateUrlFields="CategoryID,CategoryName,Description" 
    DataNavigateUrlFormatString="~/Learning.aspx?categoryID={0}&categoryName={1}&description={2}"
     />
    

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlinkfield.aspx

    then you need a 2nd page which dsiplays the details and queries the result based on the passed values…

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

Sidebar

Related Questions

I have a ListView which is using a GridView to display a DataTable and
I have a GridView containing records from a table which can be deleted or
I have a gridview which displays data for all employees and their images (stored
In my aspx page I have a gridview which displays the value from my
So I have an ASP.NET page with two controls: a GridView which displays rows
I have one web part (the provider) which displays insurance claims in a gridview.
I have a few aspx pages which displays GridView controls. In each control I
I have a gridview which displays rows and columns all linked to an sql
I have a GridView which displays in excess of 30000 rows, and users need
Basically in my in my aspx page I have a gridview which displays the

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.