HighTechTalks DotNet Forums  

strange behavor on production

ASP.net Web Controls microsoft.public.dotnet.framework.aspnet.webcontrols


Discuss strange behavor on production in the ASP.net Web Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Trapulo
 
Posts: n/a

Default strange behavor on production - 01-03-2008 , 11:41 AM






I've an aspx page that works well in development, but has strange behavor in
production.

Basically, the page hides or shows some webccontrols based on an http GET
parameter.

this is my simple page_load event hanlder:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

If Not Me.IsPostBack AndAlso Not Me.ScriptManager1.IsInAsyncPostBack Then

If Not String.IsNullOrEmpty(Request.QueryString("mode")) AndAlso
Request.QueryString("mode").ToLower = "add" Then

Me.dvPerson.ChangeMode(DetailsViewMode.Insert)

UpdateContainersVisibility()

End If

End If

end sub



and this is the called function:

Private Sub UpdateContainersVisibility()



Dim upContactsPrevVisibleState As Boolean = Me.upContacts.Visible

Select Case Me.dvPerson.CurrentMode

Case DetailsViewMode.Edit

Me.panelContacts.Visible = False

panelMemberships.visible = False

panelclubMemberships.visible = False

panelAssignments.Visible = False

panelStreetDetails.Visible = False

Case DetailsViewMode.Insert

Me.panelContacts.Visible = False

panelMemberships.visible = False

panelclubMemberships.visible = False

panelAssignments.visible = False

panelStreetDetails.Visible = False

Case DetailsViewMode.ReadOnly

Me.panelContacts.Visible = True

panelMemberships.Visible = True

panelclubMemberships.Visible = True

panelAssignments.Visible = True

panelStreetDetails.Visible = True

End Select

' -- trasmetto gli aggiornamenti ai pannelli coinvolti

If Not upContactsPrevVisibleState = upContacts.Visible Then
upContacts.Update()

End Sub



panelXX is a standard asp.net panel control

upcontacts is an updatepanel that contains some controls.



What I see is that when I call the page with the ?mode=add param, in
development server is all ok, but in production I can see every control that
may be hidden.



What can be?



thanks





Reply With Quote
  #2  
Old   
Steven Cheng[MSFT]
 
Posts: n/a

Default RE: strange behavor on production - 01-03-2008 , 09:06 PM






Hi Trapulo,

From your description, you have an ASP.NET web page which works well on
development machine, however, when deploy to production server, it works
unexpectedly, correct?

According to the code fragment you provided, you've used AJAX components in
the page, I'm wondering whether the AJAX part would be the cause of the
behavior or have you verified that the AJAX framework is correctly deployed
on the production server? To test, I suggest you make simplified test (with
some page which eliminates the AJAX part) to see whether the show/hide
behavior can work as expected.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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


--------------------
Quote:
From: "Trapulo" <trapulo2 (AT) noemail (DOT) noemail
Subject: strange behavor on production
Date: Thu, 3 Jan 2008 18:41:59 +0100

I've an aspx page that works well in development, but has strange behavor
in
production.

Basically, the page hides or shows some webccontrols based on an http GET
parameter.

this is my simple page_load event hanlder:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
Handles Me.Load

If Not Me.IsPostBack AndAlso Not Me.ScriptManager1.IsInAsyncPostBack Then

If Not String.IsNullOrEmpty(Request.QueryString("mode")) AndAlso
Request.QueryString("mode").ToLower = "add" Then

Me.dvPerson.ChangeMode(DetailsViewMode.Insert)

UpdateContainersVisibility()

End If

End If

end sub



and this is the called function:

Private Sub UpdateContainersVisibility()



Dim upContactsPrevVisibleState As Boolean = Me.upContacts.Visible

Select Case Me.dvPerson.CurrentMode

Case DetailsViewMode.Edit

Me.panelContacts.Visible = False

panelMemberships.visible = False

panelclubMemberships.visible = False

panelAssignments.Visible = False

panelStreetDetails.Visible = False

Case DetailsViewMode.Insert

Me.panelContacts.Visible = False

panelMemberships.visible = False

panelclubMemberships.visible = False

panelAssignments.visible = False

panelStreetDetails.Visible = False

Case DetailsViewMode.ReadOnly

Me.panelContacts.Visible = True

panelMemberships.Visible = True

panelclubMemberships.Visible = True

panelAssignments.Visible = True

panelStreetDetails.Visible = True

End Select

' -- trasmetto gli aggiornamenti ai pannelli coinvolti

If Not upContactsPrevVisibleState = upContacts.Visible Then
upContacts.Update()

End Sub



panelXX is a standard asp.net panel control

upcontacts is an updatepanel that contains some controls.



What I see is that when I call the page with the ?mode=add param, in
development server is all ok, but in production I can see every control
that
may be hidden.



What can be?



thanks







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.