473,326 Members | 2,111 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,326 software developers and data experts.

on_click of Button

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
Nov 19 '05 #1
4 935
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/

Nov 19 '05 #2
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

"Darren Kopp" <da********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
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/

Nov 19 '05 #3
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/de...nlifecycle.asp

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

Nov 19 '05 #4
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

"Darren Kopp" <da********@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
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/de...nlifecycle.asp
-Darren Kopp
http://blog.secudocs.com/

Nov 19 '05 #5

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

Similar topics

6
by: Skip Hollowell | last post by:
I am working on a menu bar for a site, and am using buttons in the bar (because the customer wants to use accessKeys for each selection, apparently it is too much work to click on them with a...
25
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. ...
3
by: Zürcher See | last post by:
Someone has implemented a Datagrid Button for the Windows.Form?
18
by: jrhoads23 | last post by:
Hello, I am trying to find a way to tell if an .NET windows forms Button (System.Windows.Forms.Button) is "depressed" (pushed down). For my application, I can not use a check box control set to...
2
by: Weston Weems | last post by:
Hello... I've got a solution with 7 projects... the problem I am having specifically is that I've got a simple asp:button on a simple usercontrol. I am making sure its not stupid vs.net...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
7
by: =?Utf-8?B?bWFydGluMQ==?= | last post by:
Hi, All, I create button in the code ( Dim Button as new Button), not using button web component (means not drap button and drop it ont he webform), after that I try to use button_click event,...
6
denny1824
by: denny1824 | last post by:
I have a problem that I think should be simple. In codebehind file in C# I have a loop that gets a string on each pass. I need to display that string on the page. I need it so that when someone...
23
by: shashi shekhar singh | last post by:
Dear sir, I have a word document file contains text and images, now i have saved it as a web page and wants to display it on browser , using , string str=directory.getfiles("");...
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...
0
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...
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: 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...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.