当前位置: 代码迷 >> SharePoint >> LinkButton为啥点击后不刷新
  详细解决方案

LinkButton为啥点击后不刷新

热度:238   发布时间:2016-05-02 07:23:47.0
LinkButton为什么点击后不刷新
  protected void lbQwID_Click(object sender, EventArgs e)
        {

            try
            {

                string fileUrl = UpFilesUrl;
             
                string fileName = lbQwID.Text;

                NetworkCredential nwc = new NetworkCredential(strWSName, strWSPWD, strWSDomain);
                this.m_NetworkCredential = nwc;

                HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(fileUrl + "/" + fileName);
                WebHeaderCollection whc = new WebHeaderCollection();
                if (fileUrl.Contains("aspx"))
                {
                    whc.Add("Translate", httpWebRequest.Headers.ToString());
                }
                else
                {
                    whc.Add("Translate", "f");
                }
                httpWebRequest.Headers = whc;
                CredentialCache creCache = new CredentialCache();
                creCache.Add(new Uri(fileUrl + "/" + fileName), "NTLM", this.m_NetworkCredential);
                httpWebRequest.Credentials = creCache;
                HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
                fileName = fileName.Replace("aspx", "html");
                Stream responseStream = httpWebResponse.GetResponseStream();
                long fileLength = httpWebResponse.ContentLength;
                string fileName1 = HttpUtility.UrlPathEncode(fileName);
                //string fileType = HttpUtility.UrlPathEncode(this.m_FileType);