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

Problem with button click event handler

Hey guys, I'm doing something similar to the example below (c#
version):
http://samples.gotdotnet.com/quickst...s1.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/quickst.../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

Jan 5 '07 #1
2 1215
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" wrote:
Hey guys, I'm doing something similar to the example below (c#
version):
http://samples.gotdotnet.com/quickst...s1.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/quickst.../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

Jan 5 '07 #2
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

On Jan 5, 12:30 am, W1ld0ne74 <W1ld0n...@hotmail.comwrote:
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" wrote:
Hey guys, I'm doing something similar to the example below (c#
version):
http://samples.gotdotnet.com/quickst...s1.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/quickst.../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 -
Jan 5 '07 #3

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

Similar topics

0
by: Doug Holland | last post by:
Hi Ther I have an ASP.NET user control which contains a test panel defined as follows <asp:Panel ID="TestPanel" Runat="server" / In the OnInit method I designate an event handler to handle...
5
by: Alastair Anderson | last post by:
I have created a very simple form with which I would like to update a single value in a single row of a database as a proof of concept. The relevant parts of the form are a DBWebTextBox (which...
3
by: Michael Johnson Jr. | last post by:
The problem is the following pseudo code causes you need to click buttons twice to get event. This is notable via debugging and single stepping. I can't seem to quite figure out how to do...
1
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say...
2
by: R Duke | last post by:
I have tried everything I can think of to change the visible property of a design time created control from a dynamically created control's command event handler. Here is the scenario. I have...
4
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a...
5
by: phil | last post by:
Hi, Is this a javascript or asp.net problem? When the button is clicked, the server event in the code-behind must be executed if the user clicked on "OK" of the Confirm and not executed if...
4
by: asad.naeem | last post by:
hi to all this is the problem about inheritence. I have designed a form with some essential controls which are required for every form which will inherited from it. for example i have Button1 on...
5
by: Slim | last post by:
i have a simple page, with one button button1. when click it creates a new button button 2 and adds a event handler to it. but when button 2 is clicked nothing happens, why? Partial Class...
43
by: John | last post by:
Hi This .net is driving me crazy!! In VB6 I had a type which contained a couple of multi-dimentional arrays which i used to create and read records: Type AAA : Array1(10,10,2) as Integer
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.