I am looking to open a aspx page to act an an image uploader.. this is the code I use to open the page:
$("#btnUpload").on("click", function (s) {
s.preventDefault();
var id = $('#hdnId').val();
var response = window.showModalDialog("/imageUpload.aspx/", id);
alert(response);
});
the page opens fine and looks like this:
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<label>Choose New Image:</label>
<br/>
<asp:FileUpload ID="imageUploader" runat="server"></asp:FileUpload>
<asp:Button id="UploadButton" OnClick="UploadButton_Click" Text="Upload file" runat="server"></asp:Button>
</div>
</form>
</body>
</html>
The fileupload renders ok on the page - but the choose file button doesn't work at all! ive watched in chrome & there are no jquery errors on page load or on click of the choose file button.
I've done a bit of googling and found that ajax and update panels are dodge with the fileuploader - But i'm not using either :-/
anyone know whats occurring here?? many thanks