473,386 Members | 1,803 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.

ImageButton, client-side scripts, autopostbacks

Sue
For performance purposes, I am using client-side scripts to show-hide (via css display: hide, display: block) several rows of a table depending on which imagebutton is clicked. Because of workplace standards I'm using vbscript on the client-side. The sub called hides the rows without problems, but an autopostback from the imagebutton causes the display property to reset and the rows reappear. Does anyone know a simple way to disable the autopostback on the imagebutton control? It doesn't appear to have an autopostback property to set to false....

tia,
Sue
Jul 21 '05 #1
1 4724
Hi Sue,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to disable the postback of the
ImageButtion on the web form. If there is any misunderstanding, please feel
free to let me know.

As far as I know, AutoPostback property indicates whether an automatic
postback to the server will occur whenever the user modifies something in
the control and then tabs out of the control. However, we cannot set this
property for ImageButton, because we cannot change something in that
button.

As a web control running at server side, the ImageButton will postback
whenever you click it. So if you don't need the button to post back, please
try to use an HTML control instead. I think we can use Image in HTML
control to achieve this. It is an HTML control running at client side and
will not postback. We can run client side script when it is clicked. It can
also show a picture, so that will ge the same effect as ImageButton.

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2

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

Similar topics

1
by: JIM | last post by:
Hello, Does anyone knows how to set the visible property of an asp:Imagebutton to true with javascript I've the following declared : <asp:ImageButton Id="tstImage" runat="server"...
2
by: ganesh kolappan | last post by:
Hi is there any way i can call a clientside function for validation onClick of a Image or imagebutton? Right now my image or imagebutton is submitting to the server, even it return false from...
2
by: Andrés Giraldo | last post by:
Hi! I created a webcontrol that inherits from an ImageButton, I need to show the Enable property on the PropertyBox, how can I do that? Note: The ImageButton doesn't shows the Enable property...
2
by: Chuck Hartman | last post by:
I've been trying to add an ImageButton object to a Calendar table cell, but so far I am unable to handle the Command event from that button in my form's code behind. Below is an example of what I...
1
by: Henke | last post by:
Hello, I have one ImageButton controls which I initialize in Page_Load and declare on class level. ImageButton save = new ImageButton(); save.ImageUrl = "save.gif" save.Click += new...
2
by: Darren Clark | last post by:
I have an image button on a page <asp:ImageButton Runat=server ID="btSimpleSearch" onMouseOut="this.src = 'images/button_search_n.gif'" onMouseOver="this.src = 'images/button_search_r.gif'"...
2
by: CJ Oakwood | last post by:
Morning - I am hoping somebody from this group can help me out here... I have been trying to add an array of ImageButtons to my WebForm however I keep getting an exception that I can't seem to...
1
by: Nathan Sokalski | last post by:
I want to create a pushbutton-like control on my webform that has an image on it. I used to think that this is what the ImageButton control was, but it seems to me that the ImageButton is nothing...
0
by: Oddball | last post by:
I have set up a page with uses two lots of image buttons, one for a collection and one for more images from that collection. I generate all the image buttons on page init (I know, but I...
3
by: jens.buchta | last post by:
Hi! I'm using a DataGrid with a template column to display an Image inside of it. I'm hooking into its OnPrerender-Event to set the ImageURL-Property dynamically. Everything works just fine...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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: 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:
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,...

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.