Why can't I type something like this in the page_load event:
<code>RangeValidator1.MaximumValue = "10";</code>
It refused to find the word "RangeValidator1" in the intellisense. I've seen other similar examples posted, so it is supposed to work, but it doesn't for me.
<code>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID_KEY"
DataSourceID="SqlDataSource5"
EmptyDataText="There are no data records to display."
onrowediting="GridView1_RowEditing" onload="GridView1_Load"
ondatabinding="GridView1_DataBinding" ondatabound="GridView1_DataBound"
onrowdatabound="GridView1_RowDataBound">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:TemplateField HeaderText="QTY_ORD" SortExpression="QTY_ORD">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("QTY_ORD", "{0:#,###}") %>'></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" Runat="server"
ErrorMessage="Order Quantity outside of MIN/MAX range."
MaximumValue="100" MinimumValue="10"
Type = "Integer"
ControlToValidate="TextBox1">*</asp:RangeValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("QTY_ORD", "{0:#,###}") %>'></asp:Label>
</ItemTemplate>
<ControlStyle Width="60px" />
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
</Columns>
</code>
<code>RangeValidator1.MaximumValue = "10";</code>
It refused to find the word "RangeValidator1" in the intellisense. I've seen other similar examples posted, so it is supposed to work, but it doesn't for me.
<code>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID_KEY"
DataSourceID="SqlDataSource5"
EmptyDataText="There are no data records to display."
onrowediting="GridView1_RowEditing" onload="GridView1_Load"
ondatabinding="GridView1_DataBinding" ondatabound="GridView1_DataBound"
onrowdatabound="GridView1_RowDataBound">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:TemplateField HeaderText="QTY_ORD" SortExpression="QTY_ORD">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"
Text='<%# Bind("QTY_ORD", "{0:#,###}") %>'></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" Runat="server"
ErrorMessage="Order Quantity outside of MIN/MAX range."
MaximumValue="100" MinimumValue="10"
Type = "Integer"
ControlToValidate="TextBox1">*</asp:RangeValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("QTY_ORD", "{0:#,###}") %>'></asp:Label>
</ItemTemplate>
<ControlStyle Width="60px" />
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
</Columns>
</code>