Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Stop postback/refresh using a button...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matthew Wells - 01 Mar 2008 18:49 GMT
Hello.

I'm trying to use an asp - not html - button without having a postback or a
screen refresh.  I've tried turning off "CausesValidation" and
"UseSubmitBehavior" and I still get a screen refresh - which makes me think
I'm doing a postback.  I've also tried "return false" in both the onclick
and OnClientClick events.  No Luch.  Can I use the onclick or OnClientClick
(or something else) to fire a javascritpt function and then stop?

Thanks.

Matthew Wells
Matthew.Wells@FirstByte.net
Matthew Wells - 01 Mar 2008 20:34 GMT
I found the answer myself.  Make sure UseSubmitBehavior" is True.  Do NOT
use OnClick as that requires a server postback.  Use OnClientClick and make
sure to return 'false'.  It does not have to be in a response to a "confirm"
box, just "return false;".  You can do anything in between that doesn't
cause a postback.

> Hello.
>
[quoted text clipped - 10 lines]
> Matthew Wells
> Matthew.Wells@FirstByte.net

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.