I want the user to be able to click the textfield portion to load the upload file dialog in the same was as clicking the browse button works. Can you provide a sample how I could do this?
Printable View
I want the user to be able to click the textfield portion to load the upload file dialog in the same was as clicking the browse button works. Can you provide a sample how I could do this?
Hi @michaeld,
This appears to be working as you need in IE9, FireFox and Chrome.
Example
Code:<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
<script>
var onAfterRender = function (fieldUploadField) {
fieldUploadField.inputEl.on("click", function () {
this.dom.click();
}, fieldUploadField.fileInputEl)
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:FileUploadField ID="FileUploadField1" runat="server">
<Listeners>
<AfterRender Fn="onAfterRender" />
</Listeners>
</ext:FileUploadField>
</form>
</body>
</html>
Thank you!