L
lyndon
This should be an easy answer, but i'm having problems finding the answer.
I have set a session variabel named Session["ynEdit"] that has the value of
True or False;
Session["ynEdit"] = true;
I'm using this value to determine whether or not textboxes should be
readOnly or not. The code i'm using for the textboxes is:
<asp:textbox id="id" runat="server"
ReadOnly='<%=Convert.ToBoolean(Session["ynEdit"])%>'>
I've also used
<asp:textbox id="id" runat="server" ReadOnly='<%Session["ynEdit"]%>'>
I keep getting the same result (see below) Thanks in advance.
Lyndon Hughey
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: <%=Convert.ToBoolean(Session["ynEdit"])%> is not a
valid value for Boolean.
Source Error:
Line 28: <asp:TableCell>Entity Number</asp:TableCell>
Line 29: <asp:TableCell>
Line 30: <asp:textbox id="Number" runat="server"
ReadOnly='<%=Convert.ToBoolean(Session["ynEdit"])%>'></asp:TextBox></asp:Tab
leCell></asp:TableRow>
Line 31: <asp:TableRow>
Line 32: <asp:TableCell ColumnSpan="2"><hr></asp:TableCell></asp:TableRow>
I have set a session variabel named Session["ynEdit"] that has the value of
True or False;
Session["ynEdit"] = true;
I'm using this value to determine whether or not textboxes should be
readOnly or not. The code i'm using for the textboxes is:
<asp:textbox id="id" runat="server"
ReadOnly='<%=Convert.ToBoolean(Session["ynEdit"])%>'>
I've also used
<asp:textbox id="id" runat="server" ReadOnly='<%Session["ynEdit"]%>'>
I keep getting the same result (see below) Thanks in advance.
Lyndon Hughey
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: <%=Convert.ToBoolean(Session["ynEdit"])%> is not a
valid value for Boolean.
Source Error:
Line 28: <asp:TableCell>Entity Number</asp:TableCell>
Line 29: <asp:TableCell>
Line 30: <asp:textbox id="Number" runat="server"
ReadOnly='<%=Convert.ToBoolean(Session["ynEdit"])%>'></asp:TextBox></asp:Tab
leCell></asp:TableRow>
Line 31: <asp:TableRow>
Line 32: <asp:TableCell ColumnSpan="2"><hr></asp:TableCell></asp:TableRow>