473,387 Members | 1,561 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,387 software developers and data experts.

raise event from javascript

Hi all,
How can I raise the Click event of the LinkButton server control in
Javascript?

Thanks.
Nov 18 '05 #1
2 10274
Yes you can.
First you need a control that have autopostback active (even if hidden) so
that in the page is written a javascript function
__doPostBack(eventTarget,eventArgument) that raise a postback event.
This is a little dirty but work.
Excuse for my bad english.

"Nikhil Patel" <do*******@nospaml.com> ha scritto nel messaggio
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi all,
How can I raise the Click event of the LinkButton server control in
Javascript?

Thanks.

Nov 18 '05 #2
Add a linkbutton control (LinkButton1) to a webform. In the page_load add the following line of code:

LinkButton1.Attributes.Add("onclick", "alert('Worked')");

This will just launch a alert box but it should show you how to do what your looking for.

Alan Washington
http://www.aewnet.com
Hi all,
How can I raise the Click event of the LinkButton server control in
Javascript?

Thanks.


User submitted from AEWNET (http://www.aewnet.com/)
Nov 18 '05 #3

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

Similar topics

1
by: Dan Cimpoiesu | last post by:
I have a remoting object, derived from MarshalByRefComponent, that I instantiate on the client side, with Activator.GetObject. Can I receive events fired on the server, on the client? How?
2
by: Oney | last post by:
I want to open a popup window when user click the web server button control When user click the button, only OnClik="OpenWindow(12)" is sent but no event happend no popup opened.After...
2
by: The Crow | last post by:
i want to raise an event on the server with a javascript call on the client. i found a solution but i think its not so elegant. the solution is: i call __doPostBack("RefreshPage", ""); from...
12
by: Vittorio Pavesi | last post by:
Hello, is it possible to manually raise the event Elapsed of the timer object ? Vittorio
4
by: Jeremy | last post by:
I have a combobox with a SelectionChangeCommitted event handler, and am having a problem raising this event. For example, raiseEvent mycombobox.SelectionChangeCommitted gives me an error...
8
by: simon | last post by:
hello. hopefully another quick newbie question for you.... I have a codebehind function coded to handle the click event of a button. what this function does is insert values from a data grid...
1
by: Anonieko | last post by:
I know Visual Studio lacked support on easily writing code to raise events from a ascx user control ( because you have to hand write them)....
3
by: =?Utf-8?B?Ulc=?= | last post by:
I constructed a new Class with some private members. I would like an event to be raised on the moment the value of one of those private members is changed. How do I define an event for that...
5
by: Mike | last post by:
Hi group; Let say I have an object called Account, that raises an event called AccountLow with its owns EventArgs, and when this event gets raised, I will like to raise another custom...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.