473,799 Members | 3,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Get Text from Hyperlink Column?

Hi,

I have a column in my DataGrid which is a Hyperlink Column. Everything work
fine except when I try to get the text of the column using
this.DataGrid.S electedItem.Cel ls[6* ].Text, I got blank value!!

People from some forum suggest to use ((LinkButton)
this.DataGrid.S electedItem.Cel ls[6* ].Controls[0]).Text, but I got
"Specified cast is not valid" error.

P.s. I am using codebehind method.

Please help.

Thank you.

--
Soul


Nov 18 '05 #1
1 1295
Ok... I cast to wrong thing... it is a HyperLink, not LinkButton!

--
Soul
"Soul" <no@spam.net> wrote in message
news:Ou******** ******@TK2MSFTN GP10.phx.gbl...
| Hi,
|
| I have a column in my DataGrid which is a Hyperlink Column. Everything
work
| fine except when I try to get the text of the column using
| this.DataGrid.S electedItem.Cel ls[6 ].Text, I got blank value!!
|
| People from some forum suggest to use ((LinkButton)
| this.DataGrid.S electedItem.Cel ls[6 ].Controls[0]).Text, but I got
| "Specified cast is not valid" error.
|
| P.s. I am using codebehind method.
|
| Please help.
|
| Thank you.
|
| --
| Soul
|
|
|
|
Nov 18 '05 #2

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

Similar topics

6
1526
by: Tina | last post by:
I'm going through a DataGridItem looking to find the text in a hyperlink column. It's not in mydataGridItem.cells(3).text. Where is it? thanks, T
6
1920
by: GaryB | last post by:
Does anyone have any idea how to get the text out of a hyperlink column in a web datagrid? It's a hyperlink column, not a template column so findcontrol does not work and there is no apparent name to look for. myGridItem.cells(0).controls(0) shows no text properties or anything that points to or contains the text. It seems quite hidden.
10
1946
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign a column of URLs to this hyperlink column in programming way (ie., dynamically assignment). However, I can not find a way to continue doing it. Do you have ideas about it? Thanks.
19
3561
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred to here as page_2). I need to cache the value of the link's text (hyperlink.text property) so that I can use it in the page_load event of page_2. I've thought of using a hidden field and then calling Request.Form("hdnClickedLinkText") in the...
1
2650
by: jeguillo | last post by:
I am trying to retrieve the text within each cell in a datagrid in order to change the color of each cell, depending on the value within that cell. This works fine on the cells that are bound columns, but returns an empty string for the cells that are hyperlink columns. Here is the code to retrive the text: Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
8
2592
by: Sohan Kamat | last post by:
Hi, I have a webform and I want to create a hyperlink to a text file, so that it opens on internet explorer in a new window. I have added the following <a href="file:///D:/Test/Test.txt" id="hplTest" runat="server" >testhyperlink</a> Now when I click on the hyperlink, nothing is happening. No error. when I open a browser and type file:///D:/Test/Test.txt, the file is opening.
3
7065
by: sohan | last post by:
hi I have hyperlink column in a datagrid. The column contains the name of a text file. I am able to appendthe full path of the file. The file is on D drive on the server. But on clicking on that hyperlink does not open the file. When I right click the link, I am able to save the file. I want the file to be opne in browser in a new window. I started a new webform and used a link
3
4175
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 etc. i.e Secratary loads the page on the intranet, finds the manager they want to contact, clicks on the "SMS" hyperlink and is taken to the SMS page to fill out the message and send it to the manager.
2
2064
by: mallz | last post by:
hi, in my table one of the column field has a hyperlink that takes me to another page. but, i needed to restrict the size of the column and so i put in into a text box. But, a new user would be unable to detect that this field is a hyperlink to another page, because, the underlined part indicating that it is a hyperlink is no longer visible. Is there any way i can color the text atleast so that it looks like a hyperlink? This is my code:...
0
9543
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10237
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7567
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.