tags:

views:

561

answers:

4

I am facing strange problem, Whenever I commented second if condition, it works in Production, but fail in development.

And when I dont comments second if condtion of code, it works for development and fail for production.

    protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblDocument.Text = "Document :" + this.Request.QueryString["A_No"].ToString();
                //if (!frmViewer.Action.Contains("?"))
                //{
                //    frmViewer.Action = String.Format("{0}?A_No={1}&A_Format={2}",
                //                                     frmViewer.Action,
                                                     //this.Request.QueryString["A_No"].ToString(),
//                                                     //this.Request.QueryString["A_Format"].ToString());
//                }
            }
        }

Here is Error message:

CS0117: 'System.Web.UI.HtmlControls.HtmlForm' does not contain a definition for 'Action'

+1  A: 

Did you verify that your ASPX file was migrated up to production with the latest changes?

It looks to me that the Action control was added in development, and the DLL file migrated up to production, but not the corresponding ASPX file.

Dillie-O
I just check production environment, also check the date of each file. It is same.
Syed Tayyab Ali
A: 

Other people that have reported this problem have downloaded the .NET 3.5 SP1 Update, and that fixed their issue.

Make sure both production and development are running the latest version of the .NET Framework (currently the version listed above).

Also, make sure you 'clean' your solution, then rebuild it.

George Stocker
A: 

Well Barbaros Alp give me following hint to solve this problem...

Right Click on the solution > Click Clean Solution then Build Solution –

Syed Tayyab Ali
A: 

I have no Clean Solution optio.? I'm using Visual Studio 2008 Does anyone know how to resolve it if there is no Clean solution option?