473,789 Members | 2,624 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 2406
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
2340
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
2804
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
1730
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
1292
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
6103
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
2319
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
2021
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
10408
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
10199
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
10139
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
9983
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
9020
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
7529
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...
1
4092
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
3700
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
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.