M
M O J O
I need to use Request.Form.AllKeys to get values of my textboxes, but
disabled textboxes are not shown.
Here's my code...
<%
@ Page Language="VB" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
ListBox1.Items.Clear()
If Page.IsPostBack Then
For Each s As String In Request.Form.AllKeys
ListBox1.Items.Add(New ListItem(s))
Next
End If
End Sub
</script>
<
html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtDisabled" runat="server"
Enabled="False">abcd</asp:TextBox><br />
<asp:TextBox ID="txtEnabled"
runat="server">abcd</asp:TextBox><br />
<asp:Button ID="Button1" runat="server"
Text="Button" /><br /><br />
<asp:ListBox ID="ListBox1"
runat="server"></asp:ListBox>
</div>
</form>
</body>
</html>
Click the button and watch the listbox ... the disabled control is not there.
I need to get values of disabled controls from inside a webcontrol (not user
control). I'm having problems using the FindControl method.
Any idea why the disabled controls are not showing??
Thanks!
Mojo
disabled textboxes are not shown.
Here's my code...
<%
@ Page Language="VB" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
ListBox1.Items.Clear()
If Page.IsPostBack Then
For Each s As String In Request.Form.AllKeys
ListBox1.Items.Add(New ListItem(s))
Next
End If
End Sub
</script>
<
html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtDisabled" runat="server"
Enabled="False">abcd</asp:TextBox><br />
<asp:TextBox ID="txtEnabled"
runat="server">abcd</asp:TextBox><br />
<asp:Button ID="Button1" runat="server"
Text="Button" /><br /><br />
<asp:ListBox ID="ListBox1"
runat="server"></asp:ListBox>
</div>
</form>
</body>
</html>
Click the button and watch the listbox ... the disabled control is not there.
I need to get values of disabled controls from inside a webcontrol (not user
control). I'm having problems using the FindControl method.
Any idea why the disabled controls are not showing??
Thanks!
Mojo