Пример #1
0
 /// <summary>
 /// Set target
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void grdUploadDocument_RowDataBound(Object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         HyperLink HyperLinkUplod  = e.Row.FindControl("HyperLink1") as HyperLink;
         Literal   LtlDocumentPath = e.Row.FindControl("LtlDocumentPath") as Literal;
         if (!string.IsNullOrEmpty(LtlDocumentPath.Text))
         {
             string sFileName = Path.GetExtension(LtlDocumentPath.Text);
             if (UtilBO.CheckExtection(sFileName))
             {
                 //HyperLinkUplod.Target = "";
             }
             else
             {
                 HyperLinkUplod.Target = "_blank";
             }
         }
     }
 }