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

Server event not firing twice

here is the code

----------------------------------------------------------------------------------------
<%@ Register Src="~/UserControls/SegsUC.ascx" TagName="Segs"

<asp:Panel ID="panSegsContent" runat="server" Width="100%">
<div align="right" class="marginBtm5 marginTop5">
<asp:Button ID="btnReset" runat="server" Text="reset"
CssClass="buttonSmall" OnClick="btnReset_Click" /></div>
<asp:UpdatePanel ID="uPanelSegs" runat="server">
<ContentTemplate>
<div class="padding5">
<div class="padding3">
<uct:Segs ID="Segs" runat="server" />
</div>
</div>
</ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger ControlID="btnReset"
EventName="Click" /></Triggers>
</asp:UpdatePanel>
</asp:Panel>
Server side code

protected void btnReset_Click(object sender, EventArgs e)
{
Segs.LoadInitialData();
}

----------------------------------------------------------------------------

Here what happens is that When reset button is clicked the flow goes to
btnReset_Click method (as expected), but when Reset button is clicked twice
it does not go. What could be an issue. I guess server side code should
execute on every click. Any thoughts, am I missing something here...

Aug 19 '08 #1
4 1226
I tried UpdateMode="Conditional" of the UpdatePanel but no use. The issue
is nor resolved.

"abcd" <ab**@abcd.comwrote in message
news:Of*************@TK2MSFTNGP06.phx.gbl...
here is the code

----------------------------------------------------------------------------------------
<%@ Register Src="~/UserControls/SegsUC.ascx" TagName="Segs"

<asp:Panel ID="panSegsContent" runat="server" Width="100%">
<div align="right" class="marginBtm5 marginTop5">
<asp:Button ID="btnReset" runat="server" Text="reset"
CssClass="buttonSmall" OnClick="btnReset_Click" /></div>
<asp:UpdatePanel ID="uPanelSegs" runat="server">
<ContentTemplate>
<div class="padding5">
<div class="padding3">
<uct:Segs ID="Segs" runat="server" />
</div>
</div>
</ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger ControlID="btnReset"
EventName="Click" /></Triggers>
</asp:UpdatePanel>
</asp:Panel>
Server side code

protected void btnReset_Click(object sender, EventArgs e)
{
Segs.LoadInitialData();
}

----------------------------------------------------------------------------

Here what happens is that When reset button is clicked the flow goes to
btnReset_Click method (as expected), but when Reset button is clicked
twice it does not go. What could be an issue. I guess server side code
should execute on every click. Any thoughts, am I missing something
here...
Aug 19 '08 #2
"abcd" <ab**@abcd.comwrote in message
news:Of*************@TK2MSFTNGP06.phx.gbl...
here is the code

----------------------------------------------------------------------------------------
<%@ Register Src="~/UserControls/SegsUC.ascx" TagName="Segs"

<asp:Panel ID="panSegsContent" runat="server" Width="100%">
<div align="right" class="marginBtm5 marginTop5">
<asp:Button ID="btnReset" runat="server" Text="reset"
CssClass="buttonSmall" OnClick="btnReset_Click" /></div>
<asp:UpdatePanel ID="uPanelSegs" runat="server">
<ContentTemplate>
<div class="padding5">
<div class="padding3">
<uct:Segs ID="Segs" runat="server" />
</div>
</div>
</ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger ControlID="btnReset"
EventName="Click" /></Triggers>
</asp:UpdatePanel>
</asp:Panel>
Server side code

protected void btnReset_Click(object sender, EventArgs e)
{
Segs.LoadInitialData();
}

----------------------------------------------------------------------------

Here what happens is that When reset button is clicked the flow goes to
btnReset_Click method (as expected), but when Reset button is clicked
twice it does not go. What could be an issue. I guess server side code
should execute on every click. Any thoughts, am I missing something
here...
You mean a button double-click? Or the user clicks once, and 2 minutes later
clicks again, and nothing happens? Have you set a breakpoint?
Aug 19 '08 #3
Yes once I click the button for the first time it works. I tested thru
breakpoint and its stopping in the right event. But after that if I click
the button again (after few seconds or minute) it doesn't go to breakpoint
i.e. Server Event.
"Jeff Dillon" <je********@hotmailremove.comwrote in message
news:O3**************@TK2MSFTNGP03.phx.gbl...
"abcd" <ab**@abcd.comwrote in message
news:Of*************@TK2MSFTNGP06.phx.gbl...
>here is the code

----------------------------------------------------------------------------------------
<%@ Register Src="~/UserControls/SegsUC.ascx" TagName="Segs"

<asp:Panel ID="panSegsContent" runat="server" Width="100%">
<div align="right" class="marginBtm5 marginTop5">
<asp:Button ID="btnReset" runat="server" Text="reset"
CssClass="buttonSmall" OnClick="btnReset_Click" /></div>
<asp:UpdatePanel ID="uPanelSegs" runat="server">
<ContentTemplate>
<div class="padding5">
<div class="padding3">
<uct:Segs ID="Segs" runat="server" />
</div>
</div>
</ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger ControlID="btnReset"
EventName="Click" /></Triggers>
</asp:UpdatePanel>
</asp:Panel>
Server side code

protected void btnReset_Click(object sender, EventArgs e)
{
Segs.LoadInitialData();
}

----------------------------------------------------------------------------

Here what happens is that When reset button is clicked the flow goes to
btnReset_Click method (as expected), but when Reset button is clicked
twice it does not go. What could be an issue. I guess server side code
should execute on every click. Any thoughts, am I missing something
here...
You mean a button double-click? Or the user clicks once, and 2 minutes
later clicks again, and nothing happens? Have you set a breakpoint?
Aug 20 '08 #4
I would check in your Page_Load event

"abcd" <ab**@abcd.comwrote in message
news:7B**********************************@microsof t.com...
Yes once I click the button for the first time it works. I tested thru
breakpoint and its stopping in the right event. But after that if I click
the button again (after few seconds or minute) it doesn't go to breakpoint
i.e. Server Event.
"Jeff Dillon" <je********@hotmailremove.comwrote in message
news:O3**************@TK2MSFTNGP03.phx.gbl...
>"abcd" <ab**@abcd.comwrote in message
news:Of*************@TK2MSFTNGP06.phx.gbl...
>>here is the code

----------------------------------------------------------------------------------------
<%@ Register Src="~/UserControls/SegsUC.ascx" TagName="Segs"

<asp:Panel ID="panSegsContent" runat="server" Width="100%">
<div align="right" class="marginBtm5 marginTop5">
<asp:Button ID="btnReset" runat="server" Text="reset"
CssClass="buttonSmall" OnClick="btnReset_Click" /></div>
<asp:UpdatePanel ID="uPanelSegs" runat="server">
<ContentTemplate>
<div class="padding5">
<div class="padding3">
<uct:Segs ID="Segs" runat="server" />
</div>
</div>
</ContentTemplate>
<Triggers><asp:AsyncPostBackTrigger ControlID="btnReset"
EventName="Click" /></Triggers>
</asp:UpdatePanel>
</asp:Panel>
Server side code

protected void btnReset_Click(object sender, EventArgs e)
{
Segs.LoadInitialData();
}

----------------------------------------------------------------------------

Here what happens is that When reset button is clicked the flow goes to
btnReset_Click method (as expected), but when Reset button is clicked
twice it does not go. What could be an issue. I guess server side code
should execute on every click. Any thoughts, am I missing something
here...
You mean a button double-click? Or the user clicks once, and 2 minutes
later clicks again, and nothing happens? Have you set a breakpoint?

Aug 20 '08 #5

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

Similar topics

3
by: Peter Row | last post by:
Hi, I have created a user control consisting of a textbox and a separate vertical scroll bar. The textbox is filled with data. However there could be lots of data so I only fill the textbox...
9
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see)...
4
by: Larry Morris | last post by:
The following code, pasted into a web form with a link button on it, will cause the page_unload event to fire twice. If I remove the response.redirect, the problem goes away :). I've got a work...
4
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques...
0
by: Mike Hofer | last post by:
I've noticed that some of my server-side event handlers are firing twice. I should point out that my web forms are derived from a custom base class that derives from System.Web.UI.Page. The...
4
by: ShaneFowlkes | last post by:
I have a odd thing happening. I have a sub that is called upon a button click and it seems to be firing TWICE. I have no idea how this is happening but I suspect is has something to do with...
14
by: TS | last post by:
I have this custom data list control and i override the onItemDatabound event. After upgrading to vs 2005, this event is not always getting called, though it does at other times. No changes were...
18
by: joaotsetsemoita | last post by:
Hello everyone, I'm having troubles assigning an onclick event to a cell. Im trying something like cursorPoint.cells.style.cursor = "hand"; cursorPoint.cells.width = "20";...
3
by: =?Utf-8?B?QmFycnkgR2lsYmVydA==?= | last post by:
I have a class that raises events that downstream objects subscribe to. In one case, after destroying the object, the event seems to still get handled in a subscriber object. So I instantiate an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.