Problem with button click event handler

  • Thread starter Thread starter technoGirl
  • Start date Start date
T

technoGirl

Hey guys, I'm doing something similar to the example below (c#
version):


http://samples.gotdotnet.com/quicks.../cookies1.src&file=CS\Cookies1.aspx&font=3[^]


Basically this sample has two different pages (cookies.aspx and
customize.aspx). I'm implementing it in one page (i.e. when user click
the right choices from the drop down lists, and click subit button, it
should apply those properties and change the color, font size etc. Well
when I first run the page (ctrl+F5). And the very first time that I
select the properties from the lists, they get applied properly. Then
if I go back to the drop down and change, lets say the color and text
and hit submit again... it doesnt get applied and it needs the button
clicked twice (i.e except for the intial request when it works on one
click, you need the button to be clicked twice).

So it sounds like the initial GET request is working but when you
submit (that is post back) that's when its not behaving as expected.

Can someone please help...PLEASE NOTE in the original sample that you
can run from here(
http://samples.gotdotnet.com/quickstart/aspplus/samples/apps/cookies1/VB/cookies1.aspx[^])
above that there are two pages and that could be causing this behaviour
since I only have one page but I just can't see where or how ????

Thanks for all your help
Tina
 
Do you not have a dodgy

if Postback then

clause

Other than that, possibly investigate the requires postback proporty for
your button or investigate the Viewstate.

David
 
Hello Dave, I tried doing that, it doesn't effect anything. Probably
has something to do with the way events are getting fired. Did you look
at the example code I mentioned above. Please let me know if there's
anything that may come to your mind.

Thanks

Do you not have a dodgy

if Postback then

clause

Other than that, possibly investigate the requires postback proporty for
your button or investigate the Viewstate.

David



technoGirl said:
Hey guys, I'm doing something similar to the example below (c#
version):

Basically this sample has two different pages (cookies.aspx and
customize.aspx). I'm implementing it in one page (i.e. when user click
the right choices from the drop down lists, and click subit button, it
should apply those properties and change the color, font size etc. Well
when I first run the page (ctrl+F5). And the very first time that I
select the properties from the lists, they get applied properly. Then
if I go back to the drop down and change, lets say the color and text
and hit submit again... it doesnt get applied and it needs the button
clicked twice (i.e except for the intial request when it works on one
click, you need the button to be clicked twice).
So it sounds like the initial GET request is working but when you
submit (that is post back) that's when its not behaving as expected.
Can someone please help...PLEASE NOTE in the original sample that you
can run from here(
http://samples.gotdotnet.com/quickstart/aspplus/samples/apps/cookies1...[^])
above that there are two pages and that could be causing this behaviour
since I only have one page but I just can't see where or how ????
Thanks for all your help
Tina- Hide quoted text -- Show quoted text -
 
Back
Top