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

linkbutton question

Leo
I have a linkbutton that I want to respond to the click event with in
javascript and suppress the postback. Is there a way to do this?
Nov 19 '05 #1
1 1068
Returning false from javascript for a method on a control will prevent
ASP.NET from processing the postpack.
you can use this code in Page_Load method of the ASP.NET Page:

MyButton.Attributes.Add("onclick", _
"call what you want to do" & _
";return false;")
--
rajagopal

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #2

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

Similar topics

17
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
0
by: WorkGoddammit | last post by:
Hi, I want to create a datagrid with an extra column containing a linkbutton. Clicking on the linkbutton invokes a function and passes a parameter containing the id of the row in question. I've...
1
by: Fredrik Rodin | last post by:
All, I've been trying to get this question answered before and I got some hints, but nothing that really fit my needs. Here's what I'm aiming at: I create x number of LinkButton at run-time...
0
by: Solomon Shaffer | last post by:
This is very interesting - and odd. I have a number of LinkButtons that are created in a custom data grid that I created. The purpose of the LinkButtons is to provide alphabetical filtering...
1
by: Bazza Formez | last post by:
Hi, The intended functionality is as follows : I want the user to be able to click on the LinkButton for an individual row in a datagrid, server side sub grabs id for item selected, stores in...
7
by: Alex Maghen | last post by:
I have a DataGrid control with a LinkButton command column that deletes the row. What I want to do is set it up so that there's a client-side Confirm alert BEFORE the actual Delete command gets...
3
by: Learner | last post by:
Hello, I have two buttons on one of my VehicleDetails.aspx page. Obiviously these two buttons takes the user to two different pages. Now my client is interested in having a linkbutton instead of...
0
by: jm | last post by:
I have a Gridview with a LinkButton. The button has text from my database. It is not the datakey of the database, just free form text. I want to populate another gridview based upon the data in...
1
by: David C | last post by:
I have posted this question, which I think is very simple on several sites, and nobody seems to know what I am talking about. At my wits end here. Please help. I am putting together a site...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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
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,...
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.