Showing posts with label enabled. Show all posts
Showing posts with label enabled. Show all posts

Saturday, March 24, 2012

Strange error handling problem

hi guys,

I have enabled error handling in my application through web.config and also using global.asax file.. but whenever there's any error in my application I am just transferred to default error page which is defined in web.config..

I want the code in global.asax file to take care of the error message as compared to web.config file..

what am i missing ??

web.config


<customErrors mode="RemoteOnly" defaultRedirect="~/Error/Default.aspx"/>

Global.asax


' Fires when an error occurs
Dim ptr As New SystemFunctions
ptr.SendExceptionReport(Session, Request, Server.GetLastError().InnerException, "MyWebApp")
Response.Redirect("~/Error/")
Hi,

Remove the Response.Redirect in the Global.asax file.

The default error page will anyway be shown since you specify it in the web.config. The problem is when there is a response.redirect, it is first executed irrespective of other statements.

Try removing the response.redirect.

write back if it doesn't help.

thanks.

Tuesday, March 13, 2012

strange problem about ModalPopupExtender

Hi guys
i have a strange problem about my modalpopupextender. In my page, i put a
gridview inside a updatepanel with paging enabled. also i put a
modalpopupextender in another updatepanel to do the edit and add new job.
My problem is everytime time i change the page index in my gridview. and i
click my add new button the validator in the modalpopupextender will show
the error message. but after i click the cancel button to close the
modalpopupextender then open it again. the error message will disappear. and
everything displays fine.
Can anyone tell me how this happen'..
cheers
VictorHi Victor,
First, please note this ModalPopupExtender is part of ASP.NET AJAX Control
Toolkit.
The control toolkit is a shared-source collaborative project built together
by a team containing both Microsoft and non-Microsoft developers (visit the
CodePlex Project to learn more, or volunteer to contribute). All source
for the controls is provided completely for free (with full re-use and
modification rights).
The majority of controls within the ASP.NET AJAX Control Toolkit leverage
the "Control Extender" pattern that the core ASP.NET AJAX library
introduces, and which delivers a super powerful way to easily enable
specific AJAX scenarios on a site with minimal effort.
Please download the sample website along with the control toolkit, there's
an example webform for the ModalPopupExtender. My understanding is that you
don't need to put the control inside a UpdatePanel.
Besides that, I'm also still not quite clear about the issue you described,
would you please depict more? Thanks.
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.

strange problem about ModalPopupExtender

Hi guys
i have a strange problem about my modalpopupextender. In my page, i put a
gridview inside a updatepanel with paging enabled. also i put a
modalpopupextender in another updatepanel to do the edit and add new job.
My problem is everytime time i change the page index in my gridview. and i
click my add new button the validator in the modalpopupextender will show
the error message. but after i click the cancel button to close the
modalpopupextender then open it again. the error message will disappear. and
everything displays fine.

Can anyone tell me how this happen??..

cheers
VictorHi Victor,

First, please note this ModalPopupExtender is part of ASP.NET AJAX Control
Toolkit.

The control toolkit is a shared-source collaborative project built together
by a team containing both Microsoft and non-Microsoft developers (visit the
CodePlex Project to learn more, or volunteer to contribute). All source
for the controls is provided completely for free (with full re-use and
modification rights).

The majority of controls within the ASP.NET AJAX Control Toolkit leverage
the "Control Extender" pattern that the core ASP.NET AJAX library
introduces, and which delivers a super powerful way to easily enable
specific AJAX scenarios on a site with minimal effort.

Please download the sample website along with the control toolkit, there's
an example webform for the ModalPopupExtender. My understanding is that you
don't need to put the control inside a UpdatePanel.

Besides that, I'm also still not quite clear about the issue you described,
would you please depict more? Thanks.

Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.