am working on Dynamic Menu its working fine in English when i convert this same menu in Arabic its working fine but the sub menu has some margin...if we set the margin then again for 2nd main menus submenu is not coming in order...
www.dreamcom.ae (This is for english working good)
www.dreamcom.ae/Ar/Index.aspx (This is for Arabic which is not working)
I have a page that performs a callback and I'm trying to handle the situation where the session has expired, but the callback is still being invoked.
I'm using the following code in my Global.asax
Sub Application_Error(ByVal sender AsObject, ByVal e As EventArgs)
Dim httpApp As HttpApplication = Context.ApplicationInstance
Dim httpEx As HttpException = httpApp.Server.GetLastError
If (httpEx IsNotNothing) ThenIf (httpEx.WebEventCode = System.Web.Management.WebEventCodes.AuditInvalidViewStateFailure Or _
httpEx.WebEventCode = System.Web.Management.WebEventCodes.InvalidViewState Or _
httpEx.WebEventCode = System.Web.Management.WebEventCodes.InvalidViewStateMac Or _
httpEx.WebEventCode = System.Web.Management.WebEventCodes.RuntimeErrorViewStateFailure) Then
The problem is that it is not redirecting to my error page.
I'm testing this out on an IIS7 server and I force the error by stopping, then restarting the application pool on the server in between requests. Maybe I'm performing the wrong type of test.
The fact that your session is went done will not stop the web page to work perfectly correct! ViewState and all the related info was posted to the client (in hidden fields) and will be reused on the next post-back. The only problem with session down is authentication and data you stored on the session (ASP.NET engine do not store nothing on the session by default)...
More! You are using down-casting here which can be very dangerous...Who told you GetLastError will return an HttpException! Maybe it's a SystemException or a plain Exception?!
Also, if you read explanations of the error codes you use, you will see that none of them is connected to session end - http://msdn.microsoft.com/en-us/library/system.web.management.webeventcodes(v=vs.110).aspx[^]
If you want to catch session end - and maybe set a flag for later use - see for Globla.asax...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
but,i get error :
Error 10 A using namespace directive can only be applied to namespaces; 'System.Drawing.Bitmap' is a type not a namespace F:\Education\Education\sendNewsPage.aspx.cs 15 7 Education
System.Runtime.InteropServices.ExternalException was unhandled by user code
Message="A generic error occurred in GDI+."
at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(String filename, ImageFormat format)
at System.Drawing.Image.Save(String filename)
at Education.WebForm5.sendNewsBtn_Click(Object sender, EventArgs e) in F:\Education\Education\sendNewsPage.aspx.cs:line 56
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Thank you for your reply,But it was simpler than that.
I just associated the deployed version with an application pool that uses 4.0 framework.
And when I changed it to 2.0, every thing worked normally.