I'm stuck... here's what I have
on my control the users selects a file from the file list:
Public
SelectedFile As New System.Web.UI.HtmlControls.HtmlInputHidden
Private Sub FileList_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles FileList.SelectedIndexChanged
SelectedFile.Value = FileList.SelectedItem.ToString
End Sub
Should I be declaring SelectedFile as something else?
Here is my aspx page and code behind it:
<%
@ Page Language="VB" AutoEventWireup="false"
CodeFile="upload_manager.aspx.vb" Inherits="upload_manager" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="
http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Upload Manager</title>
</head>
<body>
<form id="form1" runat="server">
<input type=hidden id=SelectedFile name=selectedfile runat=server
style="z-index: 100; left: 0px; position: absolute; top: 0px" />
<asp:Button ID="btnUpload" runat="server" Font-Names="Verdana"
Font-Size="8pt" Height="24px" Style="z-index: 101; left: 471px; position:
absolute; top: 220px" Text="Upload File" Width="89px" />
<object id=FileControl1 height=195 width=547
classid=http:FileControl.dll#FileControl.FileControlUpload>
Control Failed to Load: <br /><br />
</object>
</form>
</body>
</html>
aspx page code behind:
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnUpload.Click
Response.Write(SelectedFile.Value)
Response.End()
End Sub
I don't think its setting the value to the hidden text box.
thanks
rich