473,657 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where's the text in a hyperlink col?

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
Nov 18 '05 #1
6 1514
Hi Tiny,

Try setting trace="true" in your page so you can see all of the objects that
appear. You might find that there are literal controls in the item that you
haven't accounted for.

Ken

MVP [ASP.NET]
"Tina" <ti**********@r emovespamexcite .com> wrote in message
news:e2******** ******@TK2MSFTN GP12.phx.gbl...
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


Nov 18 '05 #2
The trace is a mess that shows up behind my controls and report - unreadable
as is often the case. You would think there would be some docs on such a
thing.
T

"Ken Cox [Microsoft MVP]" <BA************ @sympatico.ca> wrote in message
news:uR******** *****@TK2MSFTNG P15.phx.gbl...
Hi Tiny,

Try setting trace="true" in your page so you can see all of the objects
that appear. You might find that there are literal controls in the item
that you haven't accounted for.

Ken

MVP [ASP.NET]
"Tina" <ti**********@r emovespamexcite .com> wrote in message
news:e2******** ******@TK2MSFTN GP12.phx.gbl...
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

Nov 18 '05 #3
Hi,

It wont be accessible through mydataGridItem. cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem. cells(3).Findco ntrol("yourcont rolname") or
mydataGridItem. cells(3).contro l(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@r emovespamexcite .com> wrote in message
news:e2******** ******@TK2MSFTN GP12.phx.gbl...
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

Nov 18 '05 #4
The Immediate window readout is....
?item.Cells(3). Controls(0)
{System.Web.UI. WebControls.Hyp erLink}
[System.Web.UI.W ebControls.Hype rLink]:
{System.Web.UI. WebControls.Hyp erLink}
BindingContaine r: {System.Web.UI. WebControls.Dat aGridItem}
ClientID: "dgbudgets__ctl 2__ctl0"
Controls: {System.Web.UI. ControlCollecti on}
EnableViewState : True
ID: Nothing
NamingContainer : {System.Web.UI. WebControls.Dat aGridItem}
Page: {ASP.TestFeeder _aspx}
Parent: {System.Web.UI. WebControls.Tab leCell}
Site: Nothing
TemplateSourceD irectory: "/GridPrinter"
UniqueID: "dgbudgets:_ctl 2:_ctl0"
Visible: True

but there is no text value or ID that could get a text value. I use
findcontrol a lot for template columns but using the column name with
findcontrol finds nothing. I know the text has to be in there somewhere.
T

"Saravana" <sa******@sct.c o.in> wrote in message
news:Dl******** ********@news.c pqcorp.net...
Hi,

It wont be accessible through mydataGridItem. cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem. cells(3).Findco ntrol("yourcont rolname") or
mydataGridItem. cells(3).contro l(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@r emovespamexcite .com> wrote in message
news:e2******** ******@TK2MSFTN GP12.phx.gbl...
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


Nov 18 '05 #5
I've been lurking this conversation because I have the same need. Neither
of those two methods work. The first doesn't work because a hyperlink is
not a template column. The second, ...control(0) show a hyperlink object
but no text or anything that contains the text. I'll try a new thread on
this. seems nobody knows.
G

"Saravana" <sa******@sct.c o.in> wrote in message
news:Dl******** ********@news.c pqcorp.net...
Hi,

It wont be accessible through mydataGridItem. cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem. cells(3).Findco ntrol("yourcont rolname") or
mydataGridItem. cells(3).contro l(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@r emovespamexcite .com> wrote in message
news:e2******** ******@TK2MSFTN GP12.phx.gbl...
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


Nov 18 '05 #6
If you post your code, i will tell you the exact way to find the text of
that hyperlink. Surely you can find it using the method i mentioned in
previous post.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@r emovespamexcite .com> wrote in message
news:eo******** ******@TK2MSFTN GP14.phx.gbl...
The Immediate window readout is....
?item.Cells(3). Controls(0)
{System.Web.UI. WebControls.Hyp erLink}
[System.Web.UI.W ebControls.Hype rLink]:
{System.Web.UI. WebControls.Hyp erLink}
BindingContaine r: {System.Web.UI. WebControls.Dat aGridItem}
ClientID: "dgbudgets__ctl 2__ctl0"
Controls: {System.Web.UI. ControlCollecti on}
EnableViewState : True
ID: Nothing
NamingContainer : {System.Web.UI. WebControls.Dat aGridItem}
Page: {ASP.TestFeeder _aspx}
Parent: {System.Web.UI. WebControls.Tab leCell}
Site: Nothing
TemplateSourceD irectory: "/GridPrinter"
UniqueID: "dgbudgets:_ctl 2:_ctl0"
Visible: True

but there is no text value or ID that could get a text value. I use
findcontrol a lot for template columns but using the column name with
findcontrol finds nothing. I know the text has to be in there somewhere.
T

"Saravana" <sa******@sct.c o.in> wrote in message
news:Dl******** ********@news.c pqcorp.net...
Hi,

It wont be accessible through mydataGridItem. cells(3).text. You need to
access your control inside controls collection in a cell, for example.

mydataGridItem. cells(3).Findco ntrol("yourcont rolname") or
mydataGridItem. cells(3).contro l(0)

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Tina" <ti**********@r emovespamexcite .com> wrote in message
news:e2******** ******@TK2MSFTN GP12.phx.gbl...
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



Nov 18 '05 #7

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

Similar topics

4
1726
by: Dynamo | last post by:
Not sure if this is a php or an html question but I'll post it anyway. I have multiple thumbnail images on my catalogue page catalogue.php and they are all hyperlinked to a single page called desc.php that will give an enhanced description of the product selected. I want the desc.php page to print the contents of a text file named ?.txt based on which image was clicked on in my catalogue page. example: if I click on 1.jpg in my...
0
2029
by: Nel | last post by:
I am trying to write a content management section for a web site. I have managed so far to use htmlarea to give users a basic, but user friendly interface by which to edit the page content. The user can add emails by symply typing john@example.com - IE automatically converts this to a hyperlink. The trouble is sometimes the users use plain text. I have been using the following line to convert plain text to a hyperlink:
3
9494
by: deko | last post by:
I store hyperlinks as text in a table like this: Invoice11-21-2003.pdf#file://P:\Finance\PrefVendors\Receipts\Invoice11-21-20 03.pdf I need to run a report that lists the documents - or whatever the display text of the hyperlink is. As it is now, the entire hyperlink appears in the report - I'm trying to display just the document name.
6
1909
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.
19
3480
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...
3
7043
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
4164
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.
3
3717
by: avanti | last post by:
HI, I have a HyperLink in my code. It has a OnClick function defined. I am trying to access the text property of the HyperLink in my JavaScript function. <CoreCtrl:Controls.WebControls.HyperLink id="securityCodeLink" text="My Text" OnClick="ShowText(this);" Href="#" CssClass="textSmall" runat="server" />
4
4098
by: alun65 | last post by:
I'm attempting to programmatically build up some HTML in the code behind. Like so: // Create Hyperlink HyperLink link = new HyperLink(); link.NavigateUrl = "nice cat"; link.Text = "Cats Sleeping"; //Create Image Image img = new Image();
0
8305
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
8823
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
8503
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,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
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
5632
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();...
1
2726
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
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.