473,811 Members | 3,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with hyperlinks

Hi all,

I have this big problem with hyperlinks I would appriciate any help
please.
My web site has two datagrids on the same page. And one has a list of
names of the users which are in form of hyperlinks. The second
datagrid is for inserting data, and when a user inserts data I used
'Windows Authentication' for names in one column called Name.
Now this is how it's supposed to work: When any user want to see data
about a particular user it's a matter of selecting his name and the
data about the selected individual should be the only ones to be
shown.
I got some examples on Google but they all seem not to be working.
Tha's why I'm here for help please!
Here is where I've reached:
<ItemTemplate<a sp:HyperLink id="HyperLink2 " runat="server"
Text='<%#DataBi nder.Eval(Conta iner.DataItem," TeamOperation") %>'
NavigateUrl='<% #"../Dash_Board/DashBoard.aspx?
Name="+DataBind er.Eval(Contain er.DataItem,"Te amOperation")%> '>H
yperLink
</asp:HyperLink>
</ItemTemplate>
I really appriciate all the help.
Thanks.

May 4 '07 #1
1 1367
Hi...

you can do this in the code behind too... and I choose that option always...

something like that:

1. Declare de EventHandler for the Repeater or Grid or wathever in the
OnInit Method:
rptSomething.It emDataBound += new
RepeaterItemEve ntHandler(OnRpt SomethingDataBo und);
// must work also with datagrids, just find the right EventHandler.

2. Make the method that handles this event and search for the control, the
data item, and put the properties that you want.

protected void OnRptSomethingD ataBound (object sender,
RepeaterItemEve ntArgs e)
{
if (args.Item.Item Type == ListItemType.It em || args.Item.ItemT ype ==
ListItemType.Al ternatingItem)
{
//Find the DataItem
SomeObject object = e.Item.DataItem as SomeObject;
//Validate
if (object != null)
{
//Search for the hyperlink control
HyperLink link = (HyperLink)e.It em.FindControl( "HyperLink2 ");
//Validate
if (link != null)
{
link.Text = object.TeamOper ation.ToString( );
link.NavigateUr l =
string.Format(" ../Dash_Board/DashBoard.aspx? Name={0}",objec t.TeamOperation );
}
}
}
}
I hope this helps to you

Javier Romero A, MCAD
http://javier-romero.com
Temperamental .NET Developer

"rcoco" <nc******@yahoo .cawrote in message
news:11******** *************@y 80g2000hsf.goog legroups.com...
Hi all,

I have this big problem with hyperlinks I would appriciate any help
please.
My web site has two datagrids on the same page. And one has a list of
names of the users which are in form of hyperlinks. The second
datagrid is for inserting data, and when a user inserts data I used
'Windows Authentication' for names in one column called Name.
Now this is how it's supposed to work: When any user want to see data
about a particular user it's a matter of selecting his name and the
data about the selected individual should be the only ones to be
shown.
I got some examples on Google but they all seem not to be working.
Tha's why I'm here for help please!
Here is where I've reached:
<ItemTemplate<a sp:HyperLink id="HyperLink2 " runat="server"
Text='<%#DataBi nder.Eval(Conta iner.DataItem," TeamOperation") %>'
NavigateUrl='<% #"../Dash_Board/DashBoard.aspx?
Name="+DataBind er.Eval(Contain er.DataItem,"Te amOperation")%> '>H
yperLink
</asp:HyperLink>
</ItemTemplate>
I really appriciate all the help.
Thanks.
May 4 '07 #2

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

Similar topics

1
1685
by: Arpan | last post by:
I am working on Windows 2000 Professional. Due to some reasons, I had to re-install it. There is one particular ASP application named Track. The problem is I am able to visit only some of the pages in this application (using hyperlinks) but am not able to visit the rest of the pages by clicking hyperlinks (a user has to login first as 'admin' to get into the site). For e.g. there is a page named Maint.asp which has many hyperlinks. When I...
3
1060
by: JV | last post by:
I have an ASP.NET web page where IE keyboard navigation does not appear to work as it should. Normally you can tab through hyperlinks on a web page, and press <ENTER> to activate the current hyperlink. On my page, you cannot tab to some of the hyperlinks and pressing <ENTER> does nothing. This is a critical problem for accessibility. I am aware of the TABINDEX attribute, but many of my hyperlinks are being generated from within a...
4
4259
by: Seefor | last post by:
Hi, I want my text hyperlinks to have a dotted border underneath, so I did this which works fine: a, a:link, a:visited, a:hover, a:active { color: #000; text-decoration: none;
1
2380
by: Robin | last post by:
Hello! I'm having trouble with links and hyperlinks in MS Access 2003 - any help would be great! Question 1! The "insert hyperlink" icon opens a browser window, allows the user to browse to the desired file and paste the hyperlink on the form (which obviously remains for on all the records). I am trying to create a
0
9607
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
10395
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10408
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
10137
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...
1
7673
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
6895
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
5561
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...
1
4346
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
3874
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.