Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Set Tab Index on Gridviw Linkbutton Click

Posted on 2013-10-24
2
Medium Priority
?
474 Views
Last Modified: 2013-10-31
Hi

I have a gridview hyperlink field whci sets the ID in a quesrystring.

Rather than navigate to a new page I want it to stay on the same page but just display a different ajax tab.

TabContainer1.ActiveTab = TabContainer1.Tabs(5)

This code sets the querystring correctly.......

<asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server" 
                                    NavigateUrl='<%# Eval("UserID", "RegisteredUsers.aspx?id={0}") %>' 
                        Text="More Details"></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>

Open in new window


All I want to do is now display the different tab.

How can I access the Hyperlink1 click event programatically so I can set this everytime somone clicks on the hyperlink.

TabContainer1.ActiveTab = TabContainer1.Tabs(5)

Open in new window

0
Comment
Question by:Ed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 39599242
You should be able to set the OnClick to an event handler in the code-behind in the HTML.

<asp:HyperLink ID="HyperLink1" runat="server"
                                    NavigateUrl='<%# Eval("UserID", "RegisteredUsers.aspx?id={0}") %>'
                        Text="More Details" OnClick="HyperLink_Click"></asp:HyperLink>
0
 

Author Closing Comment

by:Ed
ID: 39613647
Perfect solution, thanks.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question