security - ASP.Net Control Visible=False Random Data Problem -


Does anyone know of a problem with the lie due to price to change the visible property of a control?

In the code below, line:

  control. Scene = dr.ParmDisplay;   

On some servers, if the control is not visible then it is not saving the value that was set only above it. We have a test server that this code works fine, but we have a customer whose price is not saved. If the control is is , then it saves / displays / stores properly on any server.

Is there some security patch that does this work, changes ??? I've done it Google, and I'm not getting anything related to the property I see.

The complete code for this process is:

  Secure zero loadportport () {dsReport.ReportParametersDataTable dt = objLoadXml.GetReportParameters (objReport.ReportName); Forchach (DSRPort. RiversParametersRR in DT.RO) {Control Control = empty; IParm parameter control = caps; If (Dr.Parametype.Tupper (.) Start ("DATERANGE") {control = LoadControl ("./UserControls / DateRange.ascx"); } Else if (dr.ParmType.ToUpper). Start ("DATE")) {control = LoadControl ("./UserControls / Date.ascx"); } Else {control = LoadControl ("./UserControls / Parameter.ascx"); } Control.EnableViewState = true; ParameterControl = (IParm) control; ParameterControl.ParmName = dr.ParmName; ParameterControl.ParmDescription = dr.ParmDescription; ParameterControl.ParmPickList = dr.ParmPickList.ToString (); If (dr ["ParmDefaultValue"]. ToString ()! = "") Parameter control. ParmDefaultValue = dr.ParmDefaultValue; Control.Visible = dr.ParmDisplay; PlaceHolder1.Controls.Add (control); }   

Thanks.

When you do not set a control, it does not provide the browser, so it The post will not be back and the value will not return to the server.

If you need to continue the value shown to the control, hide it directly in the scene state or hidden input etc.

Comments