Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Need to click twice to fire an Event

Reply
 
Old 05-13-2009   #1 (permalink)
Goldenrate


 
 

Need to click twice to fire an Event

Hi,

I'm developing a application using DNN platform. I created a simple NAV
based on LinkButton and populated the NavigateUrl property programmatically.
The problem is that I have to click twice on each link before the event is
fired.

Does anyone has any ideas?

Here is the ASP code:

/********************************************/
<tr>
<td><asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click">My Inbox</asp:LinkButton></td>
<td><asp:LinkButton ID="LinkButton3" runat="server"
onclick="LinkButton3_Click">My
Notifications</asp:LinkButton></td>
</tr>
/****************************/
Here is the C# code:

/************************************************/
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(57,"","aspm=inbox"));
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(57, "",
"aspm=notifications"));
}
/*******************/

Thanks,


My System SpecsSystem Spec
Old 05-14-2009   #2 (permalink)
Colbert Zhou [MSFT]


 
 

RE: Need to click twice to fire an Event

Hello,

I have a quick test in my side using an ASP.NET project, not in DNN. The
link button's click event works fine for the first time.

If you debug the application and set a breakpoint at the linkbutton event
handle, when clicking the linkbutton for the first time, does the debugger
stops at your breakpoint? Sometimes maybe the codes execute, but what we
see is different from what we thought it should be. So the debugger may be
a better thing we can trust.

I also see some discussion of a very similar case,
http://forums.asp.net/p/1074469/1575069.aspx
It happens because of not initialing the PostBackUrl in the page load event
handle. But I think if we use Response.Redirect() method showed in your
codes, we should not suffer from the problem. However, please have a check
if this is your issue.

If you need future assistance on this, is it possible to send me a
reproduciable project so that I can investigate in my side and try to find
out the root cause.


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxx.

My System SpecsSystem Spec
Old 05-14-2009   #3 (permalink)
Goldenrate


 
 

Re: Need to click twice to fire an Event

Hi,

Thanks for your prompt reply.

No the debugger doesn't stop on the breaking point. In fact the debugger
doesn't stop at all (not even on Page_load). Do you know any way to go
around it?
I can set you an ftp access to where the code is, I need a private way to
send it to you, may I use your personal email?

All Best,
David


"Colbert Zhou [MSFT]" <colbertz@xxxxxx> wrote in message
news:fVudHNI1JHA.4508@xxxxxx
Quote:

> Hello,
>
> I have a quick test in my side using an ASP.NET project, not in DNN. The
> link button's click event works fine for the first time.
>
> If you debug the application and set a breakpoint at the linkbutton event
> handle, when clicking the linkbutton for the first time, does the debugger
> stops at your breakpoint? Sometimes maybe the codes execute, but what we
> see is different from what we thought it should be. So the debugger may be
> a better thing we can trust.
>
> I also see some discussion of a very similar case,
> http://forums.asp.net/p/1074469/1575069.aspx
> It happens because of not initialing the PostBackUrl in the page load
> event
> handle. But I think if we use Response.Redirect() method showed in your
> codes, we should not suffer from the problem. However, please have a check
> if this is your issue.
>
> If you need future assistance on this, is it possible to send me a
> reproduciable project so that I can investigate in my side and try to find
> out the root cause.
>
>
> Best regards,
> Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@xxxxxx.
>
My System SpecsSystem Spec
Old 05-15-2009   #4 (permalink)
Colbert Zhou [MSFT]


 
 

Re: Need to click twice to fire an Event

Hi David,

You can contact me via my personal email, colbertzhou@xxxxxx :-)

Have a nice weekend!

Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxx.

My System SpecsSystem Spec
Old 05-21-2009   #5 (permalink)
Colbert Zhou [MSFT]


 
 

Re: Need to click twice to fire an Event

Hello David,

I haven't received any emails from you. Is there any follow up on this
thread? Any future help needed, please feel free contact me at
colbertzhou@xxxxxx

Have a nice day!

Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxx.

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
DragEnter Does Not Fire? .NET General
Turtle Creek Fire Vista General
chocolate fire guard... Vista General
FIRE FIRE !!!!!Video Games play over second page Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46