Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

.NET 2.0  Grid View Control and the hyperlinkfield column

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Evian Spring - 13 Feb 2006 15:37 GMT
Hi,
I am using the new gridview control in .NET 2.0.  I would like to
perform an action in the code behind when the user clicks one of the
hyperlink in the columns.

Is there an event I can do this in before the framework redirects to
the link?

asp:hyperlinkfield

I put temporary code in this event but they do not fire when I click
the link:
_RowCommand
_SelectedIndexChanged
_SelectedIndexChanging

In a nutshell what I want to do it this, after the user has click the
link, I want the code behind to load the object for that link so that
the next page has that object available in the session.  I wanted to
avoid building the link with the querystring.

Is this possible with the GrivView object?  or is there an other way
that would be better to accomplish this?

THANKS!
Christopher Reed - 14 Feb 2006 12:57 GMT
A hyperlink is just that: a link to another page.  There are no events
associated.

You can, however, use a ButtonField and then do your processing in the
RowCommand method before redirecting to your desired page.
Signature

Christopher A. Reed
"The oxen are slow, but the earth is patient."

> Hi,
> I am using the new gridview control in .NET 2.0.  I would like to
[quoted text clipped - 21 lines]
>
> THANKS!
Evian Spring - 16 Feb 2006 00:38 GMT
Thanks it is exactly what was needed.

Also, I found the way of having hidden fields in a grid view.

Microsoft reference:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.data
keynames.aspx


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.