标签控件不显示生产服务器上的文本。它在开发中工作正常

时间:2014-02-05 15:49:39

标签: label production

    <asp:Label ID="lblWarehouse" runat="server" Text="" CssClass="lbl" Visible="true"></asp:Label>

    lblImagePath.Text = getWarehouse(strImgPath);

    private string getWarehouse(string ImgPath)
    {
        String strPath = "";
        String strfolderPath = "";
        int intFolderNo = 0;
        for (int i = 0; i < 50; i++)
        {
            intFolderNo = i + 1;

            // Begin Change by Triveni Gadipalli on 02/03/2014.

            //strfolderPath = @"\\\\\\\\CHC29\Warehouse" + intFolderNo.ToString() + "\\\\" + ImgPath+ "\\\\";

            String FolderNo = intFolderNo.ToString();
            if (intFolderNo < 10)
            {
                FolderNo = "0" + FolderNo;
            }

             strfolderPath = @"\\\\\\\\\\pnasxl40001.chcpa.loc\emrscans\wh" + FolderNo + "\\\\" + ImgPath + "\\\\";

            //    strfolderPath = @"\\\\\\\\pnasxl40001.chcpa.loc\emrscans\wh" + folderno + "\\\\" + ImgPath + "\\\\";
            //End Change  by Triveni Gadipalli on 02/03/2014.

             if (Directory.Exists(strfolderPath))
             {
                 strPath = strfolderPath;
                 i = 50;
             }

        }

        if (strPath == "")
        {
            return strfolderPath;
        }
        else
        {
            return strPath;
        }
    }

1 个答案:

答案 0 :(得分:0)

不应该行:

    lblImagePath.Text = getWarehouse(strImgPath);

引用lblWarehouse - 这是你的示例代码中唯一的标签?