0
Reply

what is the solution of all browsers working properly

Ask a question
Pavani

Pavani

10y
863
1
This is my code .this code google chrome and firefox working properly but in IE not working .please give me best solution 


  @{
                string filetype = Model.FileLocation.Split('.')[1];
                            }
                            
                            
                             @if (filetype == "jpg")
                            {
                                <table>
                                    <tr>
                                        <td>
                                <img src="@Url.Content(Model.FileLocation)" width="150px" height="60px" style="margin-left:40px" />
                                            </td>
                                        <td>
                                   <input type="button" id="btnUpdatefile" value="@Resources.LatestUpdate.UpdateFile" class="small-button blue" />
                                            </td>
                                        </tr>
                                    </table>
                                
                            }
                             else if (filetype == "mp4" || filetype == "flv")
                             {
                                 if (System.IO.File.Exists(Server.MapPath(Model.FileLocation)))
                                 {
                                     <table>
                                         <tr>
                                             
                                             <td  style="border-width: 1px; text-align: center">
                                                @Html.ActionLink(@Resources.LatestUpdate.DownloadVideoFile, "Download", new { filePathWithName = Model.FileLocation , @style="margin-left:40px"})
                                             </td>
                                             <td>
                                                  
                                   <input type="button" id="btnVideoUpdatefile" value="@Resources.LatestUpdate.UpdateVideo" class="small-button blue" />
                                            
                                             </td>
                                         </tr>
                                     </table>
                                     
                                    
                                 }
                             }

                        </td>
                        <td>
                           @*// <input type="button" id="updatefile" value="Update File" />*@
                        </td>

                    </tr>
                    <tr id="fileuploadrow" hidden="hidden">
                         <td>
                            <br />
                            @*@Html.LabelFor(m => m.file)*@
                            @Resources.LatestUpdate.UpdatePhotoOrVideo
                        </td>
                        <td>
                            @Html.TextBoxFor(m => m.file, new { @style = "margin-left:40px", type = "file", @id = "fileDescription" })
                               <span id="spanfile" style="color: red">@Html.ValidationMessageFor(m => m.file)</span>
                              <input type="button" id="btnCancel" value="@Resources.LatestUpdate.Cancel" class="small-button blue"/>
                        </td>
                        <td>
                          
                        </td>
                    </tr>