Saw it on EE so I can't take credit for it, but try this out:
using System.Text;
...
StringBuilder hex = new StringBuilder() ;
byte[] bytes = ASCIIEncoding.A SCII.GetBytes(t extBox1.Text);
foreach (byte b in bytes)
hex.Append(" " + b.ToString("X") );
label1.Text =...
User Profile
Collapse
-
I tried a few more things inspired by your post, but I think the users may just have to select the file to be uploaded again.
1. These files could be named anything so I can't hard-code it.
2. This property of the control is read-only so I can't use a hidden text field to hold on to the filename through the trip and set it again on the postback.
So I will put this annoyance to rest. Thanks again.Leave a comment:
-
File Upload Control
Is there any way to keep the filename property of a file upload control across page loads? If some other control in the form fails validation, the user has to select the file to upload again. ViewState is enabled. Thanks!
Regards,
MB -
Try this out -
Dim fileContents As String
fileContents = My.Computer.Fil eSystem.ReadAll Text(file)
If fileContents.Co ntains(textBox. Text) Then
'blah blah
End If
fileContents = NothingLeave a comment:
No activity results to display
Show More
Leave a comment: