Making hyperlink on one column in datagrid from values in other column

Dear friends,

 I have columns in database:

id, homepage (stores url of persons hompage), name.

I want to display in datagrid in such a way that:

Only name as hyperlink (hyperlink value to be retrieved from id value, so that direct link will not be available) will appear in datagrid. So, that when user will click on hyperlinked email, it should get redirect to homepage url i.e.<a href=redirect.aspx?id=1>John></a>

Only john should appear in gridview and will be redirected to is homepage say www.xyz.com/john

 

Thanks

0
iinfoque
3/16/2007 4:54:27 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
733 Views

Similar Articles

[PageSpeed] 25

If u mean, how to place the Id and name in the DataGrid Hyperlink.

here is the code for that, might give u the result

<a href='/redirect.aspx?ID=<%#DataBinder.Eval(Container.DataItem,"ID")%>'>  <%#DataBinder.Eval(Container.DataItem,"Name")%></a>


Arshad Rasheed - MCP
Free ASP.Net & Ajax books
Please mark the most helpful reply/replies as "Answer".
0
arshadras
3/16/2007 6:07:53 AM
Reply:

Similar Artilces:

how to make datagrid column as a hyperlink column
we assign dataset to the datagrid and datagrid is filled with that data.  but I make one column as hyperlink and I want when I click on any item of that column then the new browser window open in the center of main window pls tell me how make a datagrid column as hyperlink and how to pass that column value to next window which open through javascriptBasim Hi:   You can use TemplateColumn.   Please try this: <TemplateColumn>  <ItemTemplate>   <a href="javascript:alert('hello')"><%#DataBinder.Eval(Container.DataItem,...

Can you have a hyperlink column and and edit column in one datagrid?
Hi All, Is it possible to have a datagrid that has a hyperlink column so the data related to that particular row is viewable on another page and also have a edit, cancel, update column to edit data in that grid. As i am unable to get my edit commands to work and i was wondering whether i cannot do this as i have a hyperlink column. Also does anyone have any suggestions Thanks  yes you can have as many hyperlink columns you want. infact edit,insert update delete are also hyperlink button in one columns with their respective command arguments and source values Thanks   &...

SQL,Make Multiple values for multiple columns into one column separated by comma
Hi, I'm getting the result as this Name       Class       Subject------------------------------------------Anju         10             MathsAnju         10             Physics How to write the query to get the result like this Name       Class       Subjects------------...

dw is column value read.... column value sort ....make ranking nomber init!
dw is column value read. column value sort ....make ranking nomber init! dw�� ���� column�� ���� ������ ũ������� number�� �ޱ���� �մϴ�! �����ּ���! Could you explain this a little futher? I don't understand your question. On Fri, 11 Jun 1999 11:18:01 +0900, in powersoft.public.powerbuilder.datawindow ����ģ�� <hifrand@shinbiro.com> wrote: >dw is column value read. >column value sort ....make ranking nomber init! > >dw�� ���� column�� ���� ������ ũ������� number�� >�ޱ���� �մϴ�! > >�����ּ���! > > > --- Bruce Armstrong [Te...

how to put column values as column headers in datagrid
Hi, I am trying to develop a report. Basically we have two tables named A and B. In Table A we have columns DelivTypeId EstDate CompDate In Table B we have columns DelivTypeId DelivDesc I have written a join select statement to get the DelivDesc, StartDate, Enddate so the result would be like DelivDesc StartDate EndDate Tiering1 8/31/2004 9/20/2004 Tiering2 8/31/2004 9/20/2004 Tiering3 8/31/2004 9/20/2004 Tiering4 8/31/2004 9/20/2004 I need my datag...

Passing value from one column to another column
Hi friends, I have  two drop down list controls in the Grid view control.I bound the data from data base.My problem is:             When i select value from first drop down list, the corresponding second drop down list generated  according to the  value selected in first drop down list.Please help me Regards.   Akhil   Regards,Akhil Raj K.R.Collaboratz. The Ajax Control Toolkit has a drop down list extender to use.  Goto http://www.asp.net/ajax/ajaxcontroltoolkit/  and review the C...

To make the hyperlink in DetailsView on one of the columns and to open the webaddreess on click of that hyperlink
I am wokring with detailsview binded it with the datasource. I have one column as "Webaddress" and in <itemtemplate >i want that this column value(coming form database) should appear as hyperlink and when i click on the hyperlink that particular webaddress page should open. Th problem i am facing is that i am able to create a hyperlinkbut when i click on that it is looking for the page in the project directory(folder) eg: Requested URL:/foldername(directory)/www.abc.comand error is there "The resource cannot be found." but i want to open the website specified on click. I am using...

Copy Data From One Datagrid Column To Another Column
Hi all, I am trying to copy data from one column in a datagrid to another column in the same datagrid. I am using buttons to do this, not the edit, update, cancel datagrid buttons. This is what I have been trying but with no luck :int RowCount;RowCount = 1;string DataValue;//while (RowCount < DataGrid1.Items.Count)//{// DataGrid1.SelectedIndex = RowCount;// DataGrid1.SelectedIndex = RowCount;// DataValue = DataGrid1.SelectedItem.Cells[4].Text;// DataGrid1.SelectedItem.Cells[3].Text = DataValue;} Help appreciated thanks. Try this <%@ Page Language="C#" %&...

two db table column, one datagrid column
Dear all, I have a db table which have two column, first name and last name. Can I show them in one datagrid column? Thanks Yes you may. Through the usage of the TemplateColumn, yes. An example of this: <code> <asp:DataGrid runat="server" ID="dgSomeGrid">     <Columns>         <asp:TemplateColumn>             <ItemTemplate>                 <%# DataBinder.Eval(Container.DataSource, "LastName") %&g...

Only one table column in n-columns presentation style
Hi all, I think it�s better to explain our problem with an example. Any idea to do this data (2 records): ID: 1 DATE: 19/01/2000 OBS: 11111111111 22222222222 333333 aaaaaaaa line444ae q qwe qweqee ID: 2 DATE: 19/01/2000 OBS: ad asdasda as fffffffffff hhhhhhh mmmmmmmmmPPPPPPPPPP ooooo on one DataObject (something) like: ************ ID: 1 DATE: 19/01/2000 OBS: 111111111111 aaaaaaaa 444ae 22222222222 q qwe qweqee 333333 ************ ID: 2 DATE: 19/01/2000 OBS: ad asdasda as PPPPPPPPPP ...

Dividing one column to 4 columns in the Repeater control
Hi Folks, The following is my Repeater-Control code that providing a list of 20 companies names. I'm getting all of the data in one long column and I would like to divide this one column to 4 columns. Is it possible? how can I do it in my code: <asp:Repeater ID="catlist" runat="server"> <HeaderTemplate> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> ...

hyperlinked datagrid column value passing
Hi, I am new to asp.net. I am trying to set all entries in column of "firstname" of datagrid as hyperlink and this hyperlink when clicked opens another page which displays details about the person. The value passed by the hypelink to the detail page is the ID of the person whose first name is displayed as the hyperlink in datagrid. I have the ID of ther person saved in another odbcreader object. How can I send the ID also? Is there any "onclick" event raised when user clicks on the hyperlinked entry of column? Also, you might use query string to send the value, ...

how to get the value out of the HyperLink column in the datagrid
I need to get the text which is displayed in the hyperlink column. I tried many ways but always it returns empty "". This is little bit of my C# code: foreach(DataGridItem dgi in myDataGrid.Items)             {                 CheckBox myCheckBox = (CheckBox)dgi.Cells[3].Controls[1];                 HyperLinkColumn hyper = (HyperLinkColumn) myDataGrid.Columns[1];          ...

How we can change control from one column to specific column in datawindow
How we can change control from one column to specific column in datawindow programatically. Let's suppoose there are three column in datawindow 1: Name 2: address 3: Phone when we open the window, Tab or Cursor is on column 1 (Name) now i have one button ...i want to write code in that button...when i click that button control or tab or cursor goto the phone column. Please somebody tell me how i can do this... thanks noaman mughal SetColumn. -- Bruce Armstrong [TeamSybase] http://www.teamsybase.com Two new books on developing with PowerBuilder http://www.pb9...

Web resources about - Making hyperlink on one column in datagrid from values in other column - asp.net.presentation-controls

Hyperlink - Wikipedia, the free encyclopedia
A hyperlink points to a whole document or to a specific element within a document. Hypertext is text with hyperlinks. A software system for viewing ...

SA Supreme Court rules Dr Janice Duffy was defamed by Google through its hyperlinks, auto-complete and ...
A FORMER SA Health researcher has won a six-year legal battle against Google, proving she was defamed by the internet giant due to the way it ...

Banned hyperlinks could cost you $11,000 a day
The Australian communications regulator says it will fine people who hyperlink to sites on its blacklist, which continues to be controversially ...

ANALYSIS - Supreme Court hyperlink decision a victory for free speech
A hyperlink by itself should never be seen as 'publication' of other content, the Supreme Court said. But when it comes to libel the court did ...

Review: HyperLink is a great, inexpensive steel bracelet for the Apple Watch
Apple's own stainless steel link bracelet is too expensive for many of us to consider. HyperLink, however, is a less expensive alternative that ...

Apple's 'audio hyperlink' tech can control devices with inaudible sonic pulses
An Apple patent filing published by the U.S. Patent and Trademark Office on Thursday describes a method of encoding hyperlinks into an audio ...

Patent troll sending out invoices for image hyperlinks
A company named Vuestar thinks everyone who links images to pages on the Web …

How Effective Hyperlinks Can Help Your Blog
... link text explain exactly where the link is leading you or does it say something generic like click here ? When I saw Writing Effective Hyperlinks ...

Gmail's Shortcut for Inserting Hyperlinks
... doesn't mean Google shouldn't improve them. Many people complained that Gmail's rich text editor doesn't have a shortcut for inserting hyperlinks ...

Scientology loss keeps hyperlinks legal
The Church of Scientology loses a courtroom battle to compel a Dutch writer and her ISP to remove postings from a Web site, in a ruling that ...

Resources last updated: 12/26/2015 7:33:10 PM