473,803 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need Help with System.Web.UI.W ebControls.Hype rLink

SAL
Has anyone worked with the System.Web.UI.W ebControls.Hype rLink? I am trying
to find examples on how to use it.

What I am trying to do is assign a Hyperlink to a document (i.e. .doc, .pdf,
..txt, etc.) programmaticall y. I am using VB.net, and ASP.net in VS.net 2003
with Framework 1.1.

Right now, I have a DBGrid on a ASP.net page that displays documents and
checkboxes for each row displayed. If a user checks one or more of these
checkboxes, then I want to assign a Hyperlink containing that URL to each
document selected using VB.net, and paste those Hyperlinks to the clipboard.
The user then can paste these Hypelinks to whatever they wish later (i.e.
Word, email, etc.).

The online documentation with System.Web.UI.W ebControls.Hype rLink is vague
and I could use a little help.

Thanks,
Feb 1 '06 #1
1 2407
Well, first of all you cannot copy to the clipboard using ASP.NET. If you
want to display HTML code for anchor tags, you would simply use a label and
assign a value to it's text property. However, when doing this, be sure to
use the Server.HtmlEnco de() method, otherwise your users will see a
clickable link rather than the code. Here is an example:
Dim anchorcode As String = "<a
href=""http://www.mysite.com/mydocument.pdf" ">mydocument.pd f</a>"
Server.HtmlEnco de(anchorcode)
Something else you should notice here that is extremely important is the
fact that when assigning a value to anchorcode, I used two double-quotes for
the ones that I want to see in the output code. You will probably want to
use variable values from somewhere to generate anchorcode, but I think you
get the idea (you may even want to write a function to create it). If you
need more help, let me know.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"SAL" <SA*@discussion s.microsoft.com > wrote in message
news:CA******** *************** ***********@mic rosoft.com...
Has anyone worked with the System.Web.UI.W ebControls.Hype rLink? I am
trying
to find examples on how to use it.

What I am trying to do is assign a Hyperlink to a document (i.e. .doc,
.pdf,
.txt, etc.) programmaticall y. I am using VB.net, and ASP.net in VS.net
2003
with Framework 1.1.

Right now, I have a DBGrid on a ASP.net page that displays documents and
checkboxes for each row displayed. If a user checks one or more of these
checkboxes, then I want to assign a Hyperlink containing that URL to each
document selected using VB.net, and paste those Hyperlinks to the
clipboard.
The user then can paste these Hypelinks to whatever they wish later (i.e.
Word, email, etc.).

The online documentation with System.Web.UI.W ebControls.Hype rLink is vague
and I could use a little help.

Thanks,

Feb 3 '06 #2

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

Similar topics

8
2341
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3" ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="top"> <ItemTemplate><%# CType(Container.DataItem("DateStatut"),DateTime).ToString("yyyy-MM-dd") %></ItemTemplate> <EditItemTemplate> <asp:TextBox width="80" CssClass="edit_item" id="txtDateStatut"
1
1698
by: Machelle Chandler | last post by:
All, I'm trying to populate a datagrid with a data adapter that uses a stored procedure with a parameter. I get the below error when I run my code (as seen below). Any hints? If I delete the .value = "Business Acumen" at the end of the add parameters statement & put the below code on a different row, the error goes away, but I get back an empty dataset.
0
2805
by: Jeff Tolman | last post by:
Hi! I keep getting this error, but I'm not sure why. When I turn off the trace flag, I only get it at certain times. Even with the trace flag set to true, I don't understand the output diagnostics. It shows a list of the controls on the page (or is this a partial list?) and I don't see where it has found multiple controls with IDs of '_ctl24'. Here is my list of controls. Any help or suggestions are MUCH appreciated! Thanks!
1
1731
by: Lauchlan M | last post by:
Hi. I have an ASP.net project that works fine. I copied it to another project using the following steps: << (i) create a new VS.NET ASP.NET project.
1
1293
by: Mike | last post by:
Hi, I am adding controls dynamically in a WebForm and would like to handle some of their events. Here is the code to set up the dynamic controls: System.Web.UI.WebControls.TableRow row = new TableRow(); System.Web.UI.WebControls.TableCell cell = new TableCell(); System.Web.UI.WebControls.HyperLink btn = new HyperLink(); System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); if (trk.Editable==true) {
1
6105
by: Jeremy Chapman | last post by:
I have a property will an array of webcontrols. The control features a custom property editor which can add and remove web controls to the array, but how do I persist the informtion by serializing it to the aspx page? For example, right now, here is what the html looks like when I drag my control on to the page and add some web controls to the ControlList property:
2
3472
by: loga123 | last post by:
Hi All, I am using Link Button for DELETE on the gridview. When I click on DELETE link, I get the ArgumentOutOfRangeException. But...it deletes the record from table in the database. On Gridview_rowdatabound, I am dynamically building hyperlink control based on the values in the other fields. Here is my code for Gridview_rowdatabound. It does work sometimes though.
1
2320
by: loga123 | last post by:
Hi All, I am using Link Button for DELETE on the gridview. When I click on DELETE link, I get the ArgumentOutOfRangeException. But...it deletes the record from table in the database. On Gridview_rowdatabound, I am dynamically building hyperlink control based on the values in the other fields. Here is my code for Gridview_rowdatabound. It does work sometimes though.
14
2023
by: WT | last post by:
Hello, I have a usercontrol loaded in a page with a theme. This usercontrol contains columns template with hyperlinks, with skinID. The columns are not displayed, seems thta there is some not traceable exception triggered and the all binding is stopped. But this same named skinid is working for hyperlinks outside templates.
0
9564
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
10316
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
10295
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
6842
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
5500
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...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
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
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.