I was wondering if I can make a button or a div tag only visible/invisible when the user is browsing with IE. I want to achieve that because I have Microsoft JScript runtime error: Access is denied. in IE when the user clicks on a button which triggers hidden asp.net fileupload control.
EDIT:
I have asp button :
<asp:LinkButton ID="btnSavePhoto" runat="server"></asp:LinkButton>
and file upload control with class=”hidden” (dysplay: none;):
<asp:FileUpload ID="uploadPhotoDialog" class="hidden" runat="server"/>
The idea is: when the user is browsing with IE – make fileupload visible and link button hidden.
Use conditional comments :
or if not IE
Documentation here
Update
Using your ASP markup do the following :
No need for the
classattribute then