Solved

Set Tab Index on Gridviw Linkbutton Click

Posted on 2013-10-24
2
453 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:edjones1
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 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:edjones1
ID: 39613647
Perfect solution, thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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