Advertisement

07.19.2008 at 09:01AM PDT, ID: 23579157
[x]
Attachment Details

How to pass the values of a hyperlink coulmn in a grid view to next page

Asked by nphani1884 in New Internet Users

Tags: ,

HI,
    I am having a hyperlink coulmn in the ridview and i like to send the alues of the respective row when i click on the hyperlink o a new page.Here we are not alowed to use the querystring.we are using the session varaiables.how can i send the values of the specified clicked hyperlink row values to the next page..I am attaching the sample code which i am using but its not working fine.Can any one help me out.The Datasource for the gridview is the datatable.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
Aspx code:
 
 
 
<asp:TemplateField HeaderText="Name" SortExpression="FullName">
 <ItemTemplate>
  <asp:HyperLink ID="FullName" runat="server"  NavigateUrl='<%# FormatUrl( (string) Eval("FullName") ) %>' Text = '<%# Eval("FullName") %>' /> 
 </ItemTemplate>
   </asp:TemplateField>
 
 
 
C#.Code
protected string FormatUrl(string strFullName)
        {
            
            if (strFullName==null)
            {
                //throw new ArgumentOutOfRangeException("strFullName");
                
            }
 
 
            else
 
            {
 
                strFname = strFullName;
 
                Session.Add("FullName", strFname);
               
            }
            return "~/User/AddEditUser.aspx";
        }
[+][-]07.20.2008 at 04:23AM PDT, ID: 22045311

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 09:03AM PDT, ID: 22046101

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 11:16AM PDT, ID: 22046463

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 11:20AM PDT, ID: 22046478

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: New Internet Users
Tags: C#.net,asp.net, IE7
Sign Up Now!
Solution Provided By: sm394
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.20.2008 at 03:46PM PDT, ID: 22047275

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 05:07PM PDT, ID: 22047488

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 06:38PM PDT, ID: 22047648

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.21.2008 at 12:09PM PDT, ID: 22053428

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628