473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

HyperLink from GridView

Using ASP.Net 2.0 and VS 2005.
I have a search page that has server controls, (textboxes, dropdownlists,
etc.) that are used for searching and returning data in a GridView. One of
the GridView columns is a bound HyperLink that sends me to a new aspx page.
However, when I try to use Request.Form to get contents of the controls in
the search page all requests are blank. Is this because the hyperlink does
not do a Redirect? and thus the Request.Form is not available? If so, is
there an alternative way to accomplish this? I really like using the
hyperlink. Thanks.

David
Sep 21 '06 #1
7 4951
"David" <dl*****@lifetimeinc.comwrote in message
news:OB**************@TK2MSFTNGP04.phx.gbl...
Using ASP.Net 2.0 and VS 2005.
I have a search page that has server controls, (textboxes, dropdownlists,
etc.) that are used for searching and returning data in a GridView. One
of the GridView columns is a bound HyperLink that sends me to a new aspx
page. However, when I try to use Request.Form to get contents of the
controls in the search page all requests are blank. Is this because the
hyperlink does not do a Redirect? and thus the Request.Form is not
available? If so, is there an alternative way to accomplish this? I
really like using the hyperlink. Thanks.
http://www.c-sharpcorner.com/asp/Con...ControlPSD.asp
Sep 21 '06 #2
Mark,
I read this but it references a LinkButton which I am not using. I am using
a HyperlInk control bound to a datafield in a gridView. There are no
CommandName and CommandArgument options in the properties of this control.
Am i missing something? Thanks.

David

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
"David" <dl*****@lifetimeinc.comwrote in message
news:OB**************@TK2MSFTNGP04.phx.gbl...
>Using ASP.Net 2.0 and VS 2005.
I have a search page that has server controls, (textboxes, dropdownlists,
etc.) that are used for searching and returning data in a GridView. One
of the GridView columns is a bound HyperLink that sends me to a new aspx
page. However, when I try to use Request.Form to get contents of the
controls in the search page all requests are blank. Is this because the
hyperlink does not do a Redirect? and thus the Request.Form is not
available? If so, is there an alternative way to accomplish this? I
really like using the hyperlink. Thanks.

http://www.c-sharpcorner.com/asp/Con...ControlPSD.asp

Sep 21 '06 #3
"David" <dl*****@lifetimeinc.comwrote in message
news:OY**************@TK2MSFTNGP06.phx.gbl...
Am i missing something?
Yes - use a LinkButton...
Sep 21 '06 #4
I am trying that but the SelectedIndexChanged does not seem to fire. I
created a sub that would set the value from the row.cells(1) and nothing
happens, the screen just blinks. Doesn't clicking on this LinkButton select
the current row?

David

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
"David" <dl*****@lifetimeinc.comwrote in message
news:OY**************@TK2MSFTNGP06.phx.gbl...
>Am i missing something?

Yes - use a LinkButton...

Sep 21 '06 #5
"David" <dl*****@lifetimeinc.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
I am trying that but the SelectedIndexChanged does not seem to fire.
That's right.
I created a sub that would set the value from the row.cells(1) and nothing
happens, the screen just blinks. Doesn't clicking on this LinkButton
select the current row?
No. You need to specifiy the value as the LinkButton's CommandArgument.
Sep 22 '06 #6
OK, I got it to work. I bound the CommandName and CommandArgument to the 2
column values I needed to pass and it worked. Thank you.

David
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:uI**************@TK2MSFTNGP06.phx.gbl...
"David" <dl*****@lifetimeinc.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I am trying that but the SelectedIndexChanged does not seem to fire.

That's right.
>I created a sub that would set the value from the row.cells(1) and
nothing happens, the screen just blinks. Doesn't clicking on this
LinkButton select the current row?

No. You need to specifiy the value as the LinkButton's CommandArgument.

Sep 22 '06 #7
"David" <dl*****@lifetimeinc.comwrote in message
news:uB**************@TK2MSFTNGP04.phx.gbl...
OK, I got it to work.
Hurrah!
I bound the CommandName and CommandArgument to the 2 column values I
needed to pass and it worked.
That's right.
Thank you.
You're welcome.
Sep 22 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
3
by: Wayne Wengert | last post by:
I am trying to impliment the extensions to the Club Starter kit as described at: http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/extendclubwebsitesk.asp but when I...
1
by: Carlos | last post by:
Hi all, I need a field that it is both databound, and hyperlink in a gridview. That is, the value is obtained from a query, and at the same time needs to point to a new page where will be used...
3
by: Bren | last post by:
Hi All VS2005 Gridview control with vb I am populating a gridview of company staff. One of the columns is a hyperlink to a SMS texting facility I have so secrataries can text the managers...
1
by: willip | last post by:
I have a Gridview control with a Databound Hyperlink. e.g.: <asp:HyperLinkField HeaderText="MyTitle" DataNavigateUrlFields="MyID" DataNavigateUrlFormatString="~/ShowMe.aspx?MyID={0}"...
3
by: William LaMartin | last post by:
I have a gridview (with no properties set) on an aspx page which I populate from an XML file with the code below. The data in the XML file looks like this <description>National Trust for...
4
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a GridView that is displaying master records. Some of these records have child records. I would like to a column to my master GridView such that for each master record that has...
1
by: Paul W Smith | last post by:
The text below is a GridView I am trying to use to display some data from a database. I am using one templatefield of grid because I want the contents of the record fields to appear on three...
1
by: Author | last post by:
I got into trouble with this problem. The data I am presenting in a GridView control has a column called "Website". That data comes from a stored procedure in SQL Server 2000. Most of them...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.