473,756 Members | 3,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hyperlink inside label WebControl

Hello,

How is it possible to use a hyperlink webcontrol inside a label webcontrol?

I am using resources for globalisation. Now I have a text like this:

Please click here to open that document.

"here" would be linked and should be a hyperlink webcontrol. But that is not
possible.
The other way would be to make "Please click" and "to open that document" to
labels and here to a hyperlink webcontrol.

But in other languages it would sounds crazy when translating exactly both
labels in the resource-files. So I need to integrate a hyperlink webcontrol
in a label webcontrol.

How can I solve this problem?

Thank you,

Christian
Mar 4 '06 #1
4 7504
Hi Christian,

You can put a Label like

<asp:Label id="lblID" runat="server"> Please click <a href='url'
target='_blank' >here</a> to open file</asp:Label>

HTH

Elton Wang

"Christian Hofmann" wrote:
Hello,

How is it possible to use a hyperlink webcontrol inside a label webcontrol?

I am using resources for globalisation. Now I have a text like this:

Please click here to open that document.

"here" would be linked and should be a hyperlink webcontrol. But that is not
possible.
The other way would be to make "Please click" and "to open that document" to
labels and here to a hyperlink webcontrol.

But in other languages it would sounds crazy when translating exactly both
labels in the resource-files. So I need to integrate a hyperlink webcontrol
in a label webcontrol.

How can I solve this problem?

Thank you,

Christian

Mar 4 '06 #2
Hello Elton,

"Elton W" <El****@discuss ions.microsoft. com> schrieb im Newsbeitrag
news:93******** *************** ***********@mic rosoft.com...
Hi Christian,

You can put a Label like

<asp:Label id="lblID" runat="server"> Please click <a href='url'
target='_blank' >here</a> to open file</asp:Label>


But I am using localization:
<asp:Label id="lblID" runat="server"
meta:resourceke y="MyResourceKe y></asp:Label>

so this is not possible. Do you have an other idea?

Thank you,

Christian

Mar 4 '06 #3
Suppose in Resource you get test for the label is like

"Please click here to open file"

How about to try in lblID_PreRender event

lblID.Text = lblID.Text.Repl ace("here", "<a href='url'>here </a>");

Elton

"Christian Hofmann" wrote:
Hello Elton,

"Elton W" <El****@discuss ions.microsoft. com> schrieb im Newsbeitrag
news:93******** *************** ***********@mic rosoft.com...
Hi Christian,

You can put a Label like

<asp:Label id="lblID" runat="server"> Please click <a href='url'
target='_blank' >here</a> to open file</asp:Label>


But I am using localization:
<asp:Label id="lblID" runat="server"
meta:resourceke y="MyResourceKe y></asp:Label>

so this is not possible. Do you have an other idea?

Thank you,

Christian

Mar 4 '06 #4
Hello Elton,

"Elton W" <El****@discuss ions.microsoft. com> schrieb im Newsbeitrag
news:7F******** *************** ***********@mic rosoft.com...
Suppose in Resource you get test for the label is like

lblID.Text = lblID.Text.Repl ace("here", "<a href='url'>here </a>");


This is a good solution for non ressource based projects. But the designers
should choose the links and names themselves.

Maybe it is possible to inherit the label webcontrol and the hyperlink
webcontrol. To combine them into one webcontrol. But I have no figure how to
do that.

Christian
Mar 5 '06 #5

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

Similar topics

1
2124
by: Josema | last post by:
Hi to all, i have a web custom control(webcontrol1) that has a button(button1), another webcontrol(webcontrol2) that has a label (label1), and another webcontrol (webcontrol_all). in the webcontrol_all i make this steps: 1) i instanciate the button (protected webcontrol1 mywebcontrol = new webcontrol1) 2) i instanciate the second webcontrol(protected webcontrol2 mywebcontrol2 = new webcontrol2) 3) create the event Onclick...
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...
3
8685
by: Tom Bernsen | last post by:
This should be simple, I did it with a datagrid easily enough. Using VS Net 1.1, I want a label over the datagrid and a hyperlink below it (from WebForms toolbox), with BOTH of them centered (text and control) over the page. In other words, everything centered, automatic with window size. If you have a solution not using VS (or HTML substitutes but would prefer using VS controls, clearly need datagrid and aspx), I'm all ears also. ...
3
1601
by: MrMike | last post by:
I have the following hyperlink webcontrol. The problem is that I can't figure out how to pass the webform's Request.Querystring("id") param into the NavigateURL as shown below. As it is currently formatted the hyperlink appears but I can't click on it. Could someone please let me know how to format this correctly? <asp:HyperLink id="hlBarcodes" style="Z-INDEX: 112; LEFT: 465px; POSITION: absolute; TOP: 115px" runat="server"...
3
1475
by: Christian Filzwieser | last post by:
Hy I created a WebControl called StatusBar with a static function public static void SetText(string text) { MyVariable = Text } and on Page Load I set MyVariable to the Label in my WebControl. On my Webform i load data form SqlServer into a grid and i want to set the Recordcount in the Statusbar. My Question:
9
2719
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='<%#
4
2216
by: Satya | last post by:
Hi all, The following code is throwing a run time error "The server tag is not well formed. " <ItemTemplate> <asp:HyperLink Runat="server" ID="lnkFile" NavigateUrl="javascript:OpenImage('<%# DataBinder.Eval(Container.DataItem,"FileName") %>');"><%#
3
2958
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the HyperLink control. My image is large, so I am setting the width/height attributes, but when it renders the width/height attributes are in the <atag rather than the <imgtag, therefore not making the image the size I want. I can obviously place an Image control inside the HyperLink, but the HyperLink was obviously intended to render both. Is there a way around this without using multiple controls?...
1
3772
by: sivasrec | last post by:
Hi, This is sivakumar from India. Now I am learning to ASP.NET 2.0.. I have a doubt.... I have used in a one hidden field control, 2 label controls, 2 button controls and one hyperlink controls. <asp:Label ID="Label1" runat="server" style="z-index: 1; left: 77px; top: 280px; position: absolute; height: 24px"
0
9431
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
10014
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...
0
9844
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...
0
9689
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
8688
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
7226
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
6514
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
5119
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
3326
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.