473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Call VBScript from a link button or ASP HyperLink control

Hi, I have an ASP.NET solution, and the ASPX page I have a form , I want to
copy some of the data from that form to the clipboard, I am using the below
script the script works fine when I use a normal anchor tag with the onclick
event, but I want to be able to use an actual asp control like the hylperlink
or linkbutton. I have tried the link button but it gives an error saying
Compiler Error Message: BC30456: 'VBScript' is not a member of 'ASP.sr_aspx'.
And the hyperlink control doesn't seem to have an option for the onclick. The
code is located in the .aspx not in the .vb. Thanks!

<script language="vbscript" type="text/VBScript">
sub CopyToClip
dim mytext
mytext = document.Form1.txtNote.Value
call window.clipboardData.setData("Text", mytext)
end sub
</script>
Jul 19 '05 #1
1 6191
First clue :

"I have an ASP.NET solution"
"Dustin II." <Du******@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
Hi, I have an ASP.NET solution, and the ASPX page I have a form , I want to copy some of the data from that form to the clipboard, I am using the below script the script works fine when I use a normal anchor tag with the onclick event, but I want to be able to use an actual asp control like the hylperlink or linkbutton. I have tried the link button but it gives an error saying
Compiler Error Message: BC30456: 'VBScript' is not a member of 'ASP.sr_aspx'. And the hyperlink control doesn't seem to have an option for the onclick. The code is located in the .aspx not in the .vb. Thanks!

<script language="vbscript" type="text/VBScript">
sub CopyToClip
dim mytext
mytext = document.Form1.txtNote.Value
call window.clipboardData.setData("Text", mytext)
end sub
</script>

Jul 19 '05 #2

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

Similar topics

3
by: VIJAY KUMAR | last post by:
Hi pals, I am using 2 web forms (pages). In first page, i have Datagrid control and on second page i have a hyper link control to the first page and Add value to the data grid/Database. ...
2
by: sumGirl | last post by:
Is it possible to use a hyperlink to call a vbs sub? I have seen folks using javascript to do this, but I cannot make it work with vbs and I need to. Please no "you should use javascript"...
1
by: brian | last post by:
This is the first time I have tried to create dynamic controls. I am trying to create a hyperlink control. The control will display properly but the event isn't triggered. I read a lot of...
4
by: Miguel Dias Moura | last post by:
Hello, I created a datalist in an ASP.Net / VB page. I display the image and price of a few products. When a user clicks an image I want to load the page "detail.aspx?number=id" and send the...
4
by: Kurt Schroeder | last post by:
I am trying to add a link button to a calendar. this is a simple example: Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles...
12
by: my-wings | last post by:
I'm hoping someone can tell me what I'm missing about how to open a browser and go to a website from a button or a link in Access 2000. I've tried designating a field as "Hyperlink type" and...
4
by: Jeff | last post by:
Hi, I have a ASP.NET 2.0 Web Application. Many of the pages use the ASP.NET GridView with paging and sorting. One of the columns of this Gridview is a template column (LinkButton). The data being...
4
by: Amritha.Datta | last post by:
Hi, I want to break the text in the link button into 2 lines. How would this be possible in ASP.NET 2003? Ex: I have a link button "Maintenance Screen" , I want to show that into 2 lines...
2
by: Keith G Hicks | last post by:
I'm confused about how to code a link button to go to the page I need (asp.net 2.0) My root is "Website1" Here's the layout for the purposes of this question: Website1 (folder)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...

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.