473,797 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent Postback with ImageButton

Hi,

I have an ImageButton which, when clicked, redirects to another page. The
problem is that page A (where the ImageButton is located) has lots of
information, but when I click the button, it redraws the header of the
table, which we'd like not to happen.
My question is: Is there any way of prevent this postback? Or, is there any
way of, in Page_Load, detect that it is happening due the click on the
button, so I could redirect it before the header drawing?

thanks in advance

marcelo
Nov 17 '05 #1
3 12134
the button has a postback property (i forget the exact name). set that
to false to disable postback

Marcelo wrote:
Hi,

I have an ImageButton which, when clicked, redirects to another page. The
problem is that page A (where the ImageButton is located) has lots of
information, but when I click the button, it redraws the header of the
table, which we'd like not to happen.
My question is: Is there any way of prevent this postback? Or, is there any
way of, in Page_Load, detect that it is happening due the click on the
button, so I could redirect it before the header drawing?

thanks in advance

marcelo


Nov 17 '05 #2
I found no Postback property for ImageButton

"Kairi Zikpin" <zikkai.nospam. @netscape.net> wrote in message
news:3F******** ******@netscape .net...
the button has a postback property (i forget the exact name). set that
to false to disable postback

Marcelo wrote:
Hi,

I have an ImageButton which, when clicked, redirects to another page. The problem is that page A (where the ImageButton is located) has lots of
information, but when I click the button, it redraws the header of the
table, which we'd like not to happen.
My question is: Is there any way of prevent this postback? Or, is there any way of, in Page_Load, detect that it is happening due the click on the
button, so I could redirect it before the header drawing?

thanks in advance

marcelo

Nov 17 '05 #3
you are right. my bad. did not give this one due diligence.

if you are redirectng to a new page, why is a table being redrawn? on
which page is this table? i think i need some more details

Marcelo wrote:
I found no Postback property for ImageButton

"Kairi Zikpin" <zikkai.nospam. @netscape.net> wrote in message
news:3F******** ******@netscape .net...
the button has a postback property (i forget the exact name). set that
to false to disable postback

Marcelo wrote:
Hi,

I have an ImageButton which, when clicked, redirects to another page.

The
problem is that page A (where the ImageButton is located) has lots of
informatio n, but when I click the button, it redraws the header of the
table, which we'd like not to happen.
My question is: Is there any way of prevent this postback? Or, is there

any
way of, in Page_Load, detect that it is happening due the click on the
button, so I could redirect it before the header drawing?

thanks in advance

marcelo



Nov 17 '05 #4

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

Similar topics

2
1358
by: BluDog | last post by:
Hi I have a created a custom web control called ImageBrowser, extract is below: <Code> #Region "Properties" Public Property Images() As ImageCollection
9
7516
by: Joe | last post by:
I have a DataGrid with a templated column that displays ImageButtons. I need to know if one of these buttons caused the postback or just another button on the form. If one of these buttons caused the postback than I don't want to do a DataBind otherwise I do. I know __EVENTTARGET doesn't return this information. Is there anything else that does? Thanks, Joe
7
1451
by: John Smith | last post by:
As it is now apparently illegal in the UK to produce a website which is inaccessible to the disabled, which includes the JavaScript-disabled and images-disabled, am I right in thinking that the only ASP.NET postback capable control which is now of any use is the Button control? The LinkButton is clearly no good as it uses JavaScript and the ImageButton doesn't work in Mozilla with scripting and images turned off. Am I missing something or...
3
1842
by: Carlo Marchesoni | last post by:
I would like to prevent an ImageButton to make a postback, since I added its action in Javascript. But I don't want to remove runat="server", since without this I cannot attach the JavaScript (build dynamically in code behind) to the button. Is there a way to do this ?
1
17049
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater control in my aspx page with two image buttons, one for an edit command, another a delete command. Here is a cut down code fragment. ...
2
620
by: Wizzard | last post by:
I have a repeater with and imagebutton on a page useing VS2005 ASP.Net 2.0 <asp:Repeater ID="Repeater1" runat="server" > <ItemTemplate> <div> <asp:ImageButton ImageUrl="button.gif" ID="ImageButton1" runat="server" /> <p><%# Eval("Name") %></p> </div> </ItemTemplate>
0
993
by: thersitz | last post by:
Hi, I visited this page to look at the postback tutorial: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/tipstricks/default.aspx I take the code from this page for the postback tutorial and stick it into new pages in my local website and they work. But when I try to implement the code in some existing files -- it fails. The difference bewtween the files I downloaded and the existing files in which I am trying to use the code...
6
3829
by: Jonathan Wood | last post by:
I have an image button on my page that runs some javascript: <asp:ImageButton runat="server" id="ImageButton3" ImageUrl="Graphics/Help.png" AlternateText="Help" onclientclick="javascript:ShowHelp('help_rent.aspx')" /> ShowHelp() is a function that I create that calls window.open(). It works okay--it pops up a separate help window with content from another page--but it also refreshes the current page, which I want to prevent.
4
1626
by: ma | last post by:
Hello, I want to create an image map using Zedgraph (www.ZedGraph.org). I can create an imagemap so that each point in the graph has a link and user can press that link to do some action. To bring back the user to the same page, I used the URL of the point to point to the same page. The system is working well if is it by its own but when there are some other controls on the page, it fail to work since controls losing their states.
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9536
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10468
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...
1
10205
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,...
1
7559
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...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2933
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.