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 / October 2005

Tip: Looking for answers? Try searching our database.

on_click of Button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen Noronha - 21 Oct 2005 01:28 GMT
Hi,

I have a textbox and couple of validators and a button. I have to click 2
times in order to do something.
first time it just flashes and the next time it acually works.
I have observed this recently.

Please advice,
Stephen
Darren Kopp - 21 Oct 2005 02:15 GMT
What particularly "just flashes?" I would assume that you mean the page
flashes and posts back, but I would like to clarify.

-Darren Kopp
http://blog.secudocs.com/
Stephen Noronha - 21 Oct 2005 16:51 GMT
Yes Darren,

sorry about that, it does post back but does nothing and if i click again it
works? I have a number of validation controls...
does it have to do anything with that?

Thanks,
Stephen

> What particularly "just flashes?" I would assume that you mean the page
> flashes and posts back, but I would like to clarify.
>
> -Darren Kopp
> http://blog.secudocs.com/
Darren Kopp - 21 Oct 2005 17:09 GMT
It depends on where the validation is happening.  If it is happening on
the clientside, then the page shouldn't post back if it is not valid.
What are you trying to do with in your On_Click handler? (ie add items
to viewstate/session).

I had a problem once where I had something happening similar where I
was putting items into the Session and then I had a function that would
load all the items from session each time the page loaded.

What I did once I realized that it would try to bind to late, was I had
to do all my binding to the grid in the On_Click as opposed to the
Page_Load because the controls would get their data from the view state
and such before the Page_Load would happen.

I don't know if this might be a problem that you are having, but you
might want to look at the page life cycle.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
concontrolexecutionlifecycle.asp


-Darren Kopp
http://blog.secudocs.com/
Stephen Noronha - 21 Oct 2005 19:41 GMT
Thanks Darren for your feedback.

I am trying server side validation as there are a couple of scenarios and I
am enabling them according to situation, I think there is a empty post back
and then the next time its posting

Will look into the article,
Stephen

> It depends on where the validation is happening.  If it is happening on
> the clientside, then the page shouldn't post back if it is not valid.
[quoted text clipped - 12 lines]
> I don't know if this might be a problem that you are having, but you
> might want to look at the page life cycle.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
concontrolexecutionlifecycle.asp


> -Darren Kopp
> http://blog.secudocs.com/

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.