Click here to Skip to main content
15,903,854 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: upload File size limit Pin
Michael Sync4-Jan-08 4:06
Michael Sync4-Jan-08 4:06 
GeneralRe: upload File size limit Pin
helelark1234-Jan-08 4:40
helelark1234-Jan-08 4:40 
GeneralRe: upload File size limit Pin
LloydA1114-Jan-08 14:50
LloydA1114-Jan-08 14:50 
GeneralRe: upload File size limit Pin
helelark1234-Jan-08 21:28
helelark1234-Jan-08 21:28 
GeneralRe: upload File size limit Pin
LloydA1114-Jan-08 23:46
LloydA1114-Jan-08 23:46 
GeneralRe: upload File size limit Pin
helelark1235-Jan-08 0:19
helelark1235-Jan-08 0:19 
AnswerRe: upload File size limit Pin
Guffa4-Jan-08 8:29
Guffa4-Jan-08 8:29 
GeneralRe: upload File size limit Pin
helelark1234-Jan-08 21:25
helelark1234-Jan-08 21:25 
I can something else. I can onchange event of the FileUpload object display the selected image on image object (all of this in client side) and then check the size of the object. The problem is that I am not succeed to display the picture. What is the prblem?
See my code:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script type="text/javascript">

function upload() {
var oThumbnail = document.getElementById("imgThumbnail");
filename = document.getElementById('myfile').value;
oThumbnail.src = "file:///" + escape(filename).replace(/%5C/gi,'/').replace(/%3A/gi,':');

oThumbnail = null;
}

function getSize(oImg)
{
if (oImg.fileSize >-1) {
document.getElementById('sizespan').innerHTML = oImg.fileSize;
}
}

</script>
</head>

<body>

<form id="form1" runat="server">
File: <input id="myfile" name="datafile" type="file" size="40" onchange="upload();" />
</form>

<div id="sizespan"></div>
<div id="thumbnail">
<img id="imgThumbnail" src="" alt="place holder" width="50" height="50" onload="getSize(this);"/>
</div>

</body>
</html>

What 's wrong?

Thanks

Shay Noy

GeneralRe: upload File size limit Pin
Jon Sagara4-Jan-08 17:06
Jon Sagara4-Jan-08 17:06 
Generalerror in script manager tag Pin
Pankaj Garg4-Jan-08 2:07
Pankaj Garg4-Jan-08 2:07 
GeneralServlets alternative in asp.net Pin
chanzeb4-Jan-08 1:20
chanzeb4-Jan-08 1:20 
GeneralDouble post -&gt; Please ignore Pin
N a v a n e e t h4-Jan-08 1:24
N a v a n e e t h4-Jan-08 1:24 
GeneralRe: Servlets alternative in asp.net Pin
Paul Conrad4-Jan-08 15:23
professionalPaul Conrad4-Jan-08 15:23 
GeneralDisplaying images in the DataGrid Pin
.NET- India 4-Jan-08 1:18
.NET- India 4-Jan-08 1:18 
GeneralRe: Displaying images in the DataGrid Pin
Declan Bright4-Jan-08 1:38
Declan Bright4-Jan-08 1:38 
QuestionHow to create Grid View Skin Pin
wasimsharp4-Jan-08 1:16
wasimsharp4-Jan-08 1:16 
QuestionVideo Conferencing and Live Chatting Pin
Raghvendra Kumar Roy4-Jan-08 0:51
Raghvendra Kumar Roy4-Jan-08 0:51 
GeneralPop Up window not working Pin
Shajeel3-Jan-08 23:30
Shajeel3-Jan-08 23:30 
Generalcompare datagrid cell value with datatable values....., Pin
Member 38798813-Jan-08 23:17
Member 38798813-Jan-08 23:17 
GeneralRe: compare datagrid cell value with datatable values....., Pin
Declan Bright4-Jan-08 0:12
Declan Bright4-Jan-08 0:12 
GeneralRe: compare datagrid cell value with datatable values....., Pin
Member 38798814-Jan-08 0:32
Member 38798814-Jan-08 0:32 
GeneralRe: compare datagrid cell value with datatable values....., Pin
Declan Bright4-Jan-08 0:59
Declan Bright4-Jan-08 0:59 
GeneralXML Connection Pin
Kapil Chauhan3-Jan-08 23:13
Kapil Chauhan3-Jan-08 23:13 
GeneralRe: XML Connection Pin
N a v a n e e t h4-Jan-08 0:35
N a v a n e e t h4-Jan-08 0:35 
Generaldrop down menu in asp.net Pin
hk3-Jan-08 22:54
hk3-Jan-08 22:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.