473,831 Members | 2,237 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET - Assistance with Hyperlink

I have an ASP.NET web form that I'm developing, and I'm running into a
problem with my below code. Business rules aside, is there anything
noticably wrong with this syntax? This syntax is being used to create a
hyperlink in a template column of a datagrid. In the designer, once I
implement this code the word "Databound" appears in the column, but when I
display the page in browser it errors out on this line. Thanks.

<asp:HyperLin k runat="server" Text='<%# DataBinder.Eval (Container,
"DataItem.Flitc hNum") %> ' NavigateURL='<% # "Logs_Detail.as px?id=" &
DataBind.Eval(C ontainer, "DataItem.Flitc hNum") %>' Target="_self"
ID="Hyperlink2" >
</asp:HyperLink>
Jul 21 '05 #1
2 2549
Hi,
If this is on C#, use the + opertor instead of & for string concatenation
(inside NavigateUrl attribute value).

"MrMike" <Mr****@discuss ions.microsoft. com> wrote in message
news:AA******** *************** ***********@mic rosoft.com...
I have an ASP.NET web form that I'm developing, and I'm running into a
problem with my below code. Business rules aside, is there anything
noticably wrong with this syntax? This syntax is being used to create a
hyperlink in a template column of a datagrid. In the designer, once I
implement this code the word "Databound" appears in the column, but when I
display the page in browser it errors out on this line. Thanks.

<asp:HyperLin k runat="server" Text='<%# DataBinder.Eval (Container,
"DataItem.Flitc hNum") %> ' NavigateURL='<% # "Logs_Detail.as px?id=" &
DataBind.Eval(C ontainer, "DataItem.Flitc hNum") %>' Target="_self"
ID="Hyperlink2" >
</asp:HyperLink>
Jul 21 '05 #2
Shiva, As it turns out it looks like there is a connection string problem
causing this. Thanks.

"Shiva" wrote:
Hi,
If this is on C#, use the + opertor instead of & for string concatenation
(inside NavigateUrl attribute value).

"MrMike" <Mr****@discuss ions.microsoft. com> wrote in message
news:AA******** *************** ***********@mic rosoft.com...
I have an ASP.NET web form that I'm developing, and I'm running into a
problem with my below code. Business rules aside, is there anything
noticably wrong with this syntax? This syntax is being used to create a
hyperlink in a template column of a datagrid. In the designer, once I
implement this code the word "Databound" appears in the column, but when I
display the page in browser it errors out on this line. Thanks.

<asp:HyperLin k runat="server" Text='<%# DataBinder.Eval (Container,
"DataItem.Flitc hNum") %> ' NavigateURL='<% # "Logs_Detail.as px?id=" &
DataBind.Eval(C ontainer, "DataItem.Flitc hNum") %>' Target="_self"
ID="Hyperlink2" >
</asp:HyperLink>

Jul 21 '05 #3

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

Similar topics

1
3392
by: Badboy36 | last post by:
Hello user from googlegroups, i made a microsoft access database with front and backend. i created the backend in microsoft access97. for the frontend i made two versions (one for microsoft access 97 and the other one for microsoft acess 2000/2002). my problem is in a field with a hyperlink , which i selected in a table. this hyperlink refer to microsoft word documents on our intranet. i enter the hyperlink in a formular (right...
0
550
by: Ryan Harvey | last post by:
Hi all, I have written a web user control that contains a repeater control. the ItemTemplate for this control is basically 6 Hyperlinks in a row, that are dynamically allocated one of 7 gif images as the ImageURL of the Hyperlink. When a load the page with the controls on it works fine, but sometimes the images are broken, but if i hit refresh i get random selections of the gifs appearing and not appearing. if i hit Back button to a page...
5
6693
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it does not act as a link. My repeater code is below but here is the snippet of my asp:hyperlink object; <asp:HyperLink NavigateUrl="authonly/clientdetails.aspx?searchID="+<%#DataBinder.Eval(Conta iner.DataItem,"CLIENTREF")%> ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem,...
9
2721
by: Leon | last post by:
What Am I Doing Wrong? Code Will Not Run, I Can't See The Error! Thanks. <asp:datalist id="DataList1" runat="server" RepeatColumns="4"> <ItemTemplate> <asp:HyperLink id=HyperLink1 ImageUrl= '<%# String.Format("Toyota/Images/Showroom/" & Container.DataItem("PathToDisplyPic"))%>' NavigateUrl='<%#
10
1948
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.
2
278
by: MrMike | last post by:
I have an ASP.NET web form that I'm developing, and I'm running into a problem with my below code. Business rules aside, is there anything noticably wrong with this syntax? This syntax is being used to create a hyperlink in a template column of a datagrid. In the designer, once I implement this code the word "Databound" appears in the column, but when I display the page in browser it errors out on this line. Thanks. <asp:HyperLink...
8
3805
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a System.Web.UI.WebControls.Image Control or a HyperLink and Image Controls, but the onMouseOver and onMouseOut attributes must be in the <img> tag. If I were to use the HyperLink's ImageUrl property and add the attributes using the...
20
3014
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is a control. I have 2 files "displayCompanyJobs.aspx" and "displayCompanyOverview.aspx" which are in both the folder "/jobseeker/" and "/employer/". I have a user control "displayCompanyJobs.ascx" that is in my /applicant/
10
3013
by: sierra7 | last post by:
I'm trying to create a form where a user enters a document reference number and then clicks a command button to add a hyperlink to the document, via a file picker. Thanks to Adezii's excellent article http://bytes.com/topic/access/answers/725778-inserting-hyperlink-into-table I can manage to create a hyperlink to the document and store it in the table, but it is the full hyperlink path not the reference number of the document that is...
0
9793
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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
10777
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
10526
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
10206
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
9315
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
7747
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
5617
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...
2
3960
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.