473,385 Members | 1,752 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,385 software developers and data experts.

Difficulty in adding hyperlink control to datagrid

i'm trying to display some values in Gridview. but i don't know how many columns i need to display. at run time only i will come to know how many columns i need to display. it depends up on the values from Database. so i'm creating columns dynamically and adding to gridview. till that it works fine. but i want some columns value to be hyperlink. so i need to create some columns hyperlink dynamically.

here i saw hyperlink creation code below:

Expand|Select|Wrap|Line Numbers
  1. Dim myLink As New HyperLink
  2. myLink.Text = columnText
  3. myLink.NavigateUrl = "Update.aspx?id=" & columnID
  4. container.Controls.Add(myLink)
but here problem is i cant access hyperlink field though i used

imports system.web
Aug 14 '13 #1
0 918

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Daily | last post by:
How to get text from clicked HyperLink in Datagrid? and Is possible returning to another aspx file? how?
0
by: ann | last post by:
I am trying to access the text of the hyperlink control during the delete command. I am retrieving the ID in there as well and it works fine:e.Item.Cells.Text The hyperlink code is returning...
3
by: Kumar | last post by:
Hi Folks, I have a question regarding conditional hyperlink in datagrid. I want to display Hyperlink if my QID values in (1,4,5,6) other wise i want to display just Qdescription with out...
0
by: Tom Jorgenson | last post by:
I need to create a custom control that behaves like a HyperLink control EXCEPT where I can get into the events somewhere to programmatically decided whether to actually perform the link request, or...
0
by: AC | last post by:
I'm sure this is possible, I'm just having trouble wiht my implementation... How can you programatically add a DataGrid with with bound data to a page? I have a case where I don't have access to...
2
by: Amir Eshterayeh | last post by:
Dear Friends I put a asp.net hyperlink control inside a datagrid as even a template column or hyperlink column but can not force datagrid to open a new window when I clicked on the hyperlink. I...
4
by: Mark Rae | last post by:
Hi, I have an <asp:PlaceHolder control on a page in an ASP.NET 1.1 app, as follows: <td nowrap><asp:PlaceHolder ID="phClientWebsite" Runat=server>&nbsp;</asp:PlaceHolder></td> Server-side,...
2
by: Daves | last post by:
I'm dynamically adding Hyperlink controls to a Label control. Can I somehow add " : " string after each hyperlink control so that the links appear like Link1 :: Link2 :: Link 3
1
by: venkat6725 | last post by:
hi, i magrated the dotnet 1.1(2003) versioned asp.net with vb.net application to version 2.0(2005) After migrated: in all of my webforms i hav used hyperlink in datagrid. the page_load event is...
1
globalguideline
by: globalguideline | last post by:
Hi! I am using a DataGrid to show my table values. Some of the columns are showing integer data. I need to show these IDs (Integer values) data as hyperlinks so that the user can drill downward...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.