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

Stop a button posting back

How can I programatically stop a Button or an ImageButton from causing a
postback ? I just want it to do nothing.
Nov 18 '05 #1
9 3710
Does setting the Enabled property to False help?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
How can I programatically stop a Button or an ImageButton from causing a
postback ? I just want it to do nothing.

Nov 18 '05 #2
Enabled = false;

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
How can I programatically stop a Button or an ImageButton from causing a
postback ? I just want it to do nothing.

Nov 18 '05 #3
Well, a Button has an enabled property but an ImageButton doesn't.

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
Does setting the Enabled property to False help?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
How can I programatically stop a Button or an ImageButton from causing a
postback ? I just want it to do nothing.


Nov 18 '05 #4
It does.

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:u%****************@TK2MSFTNGP10.phx.gbl...
Well, a Button has an enabled property but an ImageButton doesn't.

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
Does setting the Enabled property to False help?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
How can I programatically stop a Button or an ImageButton from causing a postback ? I just want it to do nothing.



Nov 18 '05 #5
Oh no it doesn't !
(it's pantomime season again)

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez*************@tk2msftngp13.phx.gbl...
It does.

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:u%****************@TK2MSFTNGP10.phx.gbl...
Well, a Button has an enabled property but an ImageButton doesn't.

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
Does setting the Enabled property to False help?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"JezB" <je***********@blueyonder.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> How can I programatically stop a Button or an ImageButton from
causing
a > postback ? I just want it to do nothing.
>
>



Nov 18 '05 #6
http://msdn.microsoft.com/library/de...mberstopic.asp

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:uB**************@TK2MSFTNGP12.phx.gbl...
Oh no it doesn't !
(it's pantomime season again)

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez*************@tk2msftngp13.phx.gbl...
It does.

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:u%****************@TK2MSFTNGP10.phx.gbl...
Well, a Button has an enabled property but an ImageButton doesn't.

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
> Does setting the Enabled property to False help?
>
> --
> Teemu Keiski
> MCP, Microsoft MVP (ASP.NET), AspInsiders member
> ASP.NET Forum Moderator, AspAlliance Columnist
> http://blogs.aspadvice.com/joteke
>
>
> "JezB" <je***********@blueyonder.co.uk> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
> > How can I programatically stop a Button or an ImageButton from

causing
a
> > postback ? I just want it to do nothing.
> >
> >
>
>



Nov 18 '05 #7
Well, when I create an ImageButton on a page or in code, the Enabled
property just isnt there (in the property grid in designer, or in the
intellisense list)! Try it yourself.

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OK****************@tk2msftngp13.phx.gbl...
http://msdn.microsoft.com/library/de...mberstopic.asp
Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:uB**************@TK2MSFTNGP12.phx.gbl...
Oh no it doesn't !
(it's pantomime season again)

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez*************@tk2msftngp13.phx.gbl...
It does.

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:u%****************@TK2MSFTNGP10.phx.gbl...
> Well, a Button has an enabled property but an ImageButton doesn't.
>
> "Teemu Keiski" <jo****@aspalliance.com> wrote in message
> news:uD**************@TK2MSFTNGP11.phx.gbl...
> > Does setting the Enabled property to False help?
> >
> > --
> > Teemu Keiski
> > MCP, Microsoft MVP (ASP.NET), AspInsiders member
> > ASP.NET Forum Moderator, AspAlliance Columnist
> > http://blogs.aspadvice.com/joteke
> >
> >
> > "JezB" <je***********@blueyonder.co.uk> wrote in message
> > news:%2****************@TK2MSFTNGP09.phx.gbl...
> > > How can I programatically stop a Button or an ImageButton from

causing
a
> > > postback ? I just want it to do nothing.
> > >
> > >
> >
> >
>
>



Nov 18 '05 #8
You are right. It is not found neither in the property grid nor in the
intellisense list. But it does exist. You can set it in the code and it
compiles and works. Apparently, there is a problem in the development
environment.

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:OY**************@TK2MSFTNGP09.phx.gbl...
Well, when I create an ImageButton on a page or in code, the Enabled
property just isnt there (in the property grid in designer, or in the
intellisense list)! Try it yourself.

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OK****************@tk2msftngp13.phx.gbl...

http://msdn.microsoft.com/library/de...mberstopic.asp

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:uB**************@TK2MSFTNGP12.phx.gbl...
Oh no it doesn't !
(it's pantomime season again)

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez*************@tk2msftngp13.phx.gbl...
> It does.
>
> Eliyahu
>
> "JezB" <je***********@blueyonder.co.uk> wrote in message
> news:u%****************@TK2MSFTNGP10.phx.gbl...
> > Well, a Button has an enabled property but an ImageButton doesn't.
> >
> > "Teemu Keiski" <jo****@aspalliance.com> wrote in message
> > news:uD**************@TK2MSFTNGP11.phx.gbl...
> > > Does setting the Enabled property to False help?
> > >
> > > --
> > > Teemu Keiski
> > > MCP, Microsoft MVP (ASP.NET), AspInsiders member
> > > ASP.NET Forum Moderator, AspAlliance Columnist
> > > http://blogs.aspadvice.com/joteke
> > >
> > >
> > > "JezB" <je***********@blueyonder.co.uk> wrote in message
> > > news:%2****************@TK2MSFTNGP09.phx.gbl...
> > > > How can I programatically stop a Button or an ImageButton from
causing
> a
> > > > postback ? I just want it to do nothing.
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #9
Ah so that is why - so we were both right :)
Thanks for your help

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
You are right. It is not found neither in the property grid nor in the
intellisense list. But it does exist. You can set it in the code and it
compiles and works. Apparently, there is a problem in the development
environment.

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:OY**************@TK2MSFTNGP09.phx.gbl...
Well, when I create an ImageButton on a page or in code, the Enabled
property just isnt there (in the property grid in designer, or in the
intellisense list)! Try it yourself.

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:OK****************@tk2msftngp13.phx.gbl...

http://msdn.microsoft.com/library/de...mberstopic.asp

Eliyahu

"JezB" <je***********@blueyonder.co.uk> wrote in message
news:uB**************@TK2MSFTNGP12.phx.gbl...
> Oh no it doesn't !
> (it's pantomime season again)
>
> "Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
> news:ez*************@tk2msftngp13.phx.gbl...
> > It does.
> >
> > Eliyahu
> >
> > "JezB" <je***********@blueyonder.co.uk> wrote in message
> > news:u%****************@TK2MSFTNGP10.phx.gbl...
> > > Well, a Button has an enabled property but an ImageButton doesn't. > > >
> > > "Teemu Keiski" <jo****@aspalliance.com> wrote in message
> > > news:uD**************@TK2MSFTNGP11.phx.gbl...
> > > > Does setting the Enabled property to False help?
> > > >
> > > > --
> > > > Teemu Keiski
> > > > MCP, Microsoft MVP (ASP.NET), AspInsiders member
> > > > ASP.NET Forum Moderator, AspAlliance Columnist
> > > > http://blogs.aspadvice.com/joteke
> > > >
> > > >
> > > > "JezB" <je***********@blueyonder.co.uk> wrote in message
> > > > news:%2****************@TK2MSFTNGP09.phx.gbl...
> > > > > How can I programatically stop a Button or an ImageButton from > causing
> > a
> > > > > postback ? I just want it to do nothing.
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #10

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

Similar topics

11
by: brendan | last post by:
Sorry this isnt a cross post .. i just didnt get any help from alt.php. I have a website which utilises post forms for navigation in some areas. Problem is, when *some* users hit the BACK button...
1
by: Jakub | last post by:
I have the following problem. Suppose I added a button to my worksheet and when user clicks the button a function starts. Now, as long as this function is running the worksheet is not active. The...
1
by: Geoff | last post by:
Hey.. I'm having problems with stopping this timer from outside the 'runTimer()' class.. i have no problems calling 'cancel()' from inside the run() method but I want to be able to stop the Timer...
16
by: deko | last post by:
I have a sub routine that searches the Outlook PST for a message sent to/from a particular email address. Obviously, this can take a long time when the PST contains thousands of messages. I'd...
4
by: Russ | last post by:
I have a form page with a submit button. When the submit is successfull (good return from web service), I insert a script to put up a message box saying "Form submitted". That works fine, but...
7
by: Timo Haberkern | last post by:
Hi there, i have some troubles with my TSearch2 Installation. I have done this installation as described in http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_compound_words...
8
by: Richard Maher | last post by:
Hi, I am in a mouseup event for button A and I'd like to disable=false button B before starting some work. Is there anyway that an event for button B can then fire before my event processing for...
1
by: mark4asp | last post by:
How can I stop a post back from firing when there is no need for it to? I have a GridView pager template (shown below): There are 3 commands: ddlPager_SelectedIndexChanged - move the page to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.