T
tshad
Here is the DropDown:
<aspropDownList ID="ScreenTest" runat="server" />
Here is the code:
ScreenTest.DataSource=objCmd.ExecuteReader
ScreenTest.DataValueField="ScreenTemplateMasterID"
ScreenTest.DataTextField= "ScreenName"
ScreenTest.databind()
ScreenTest.Items.Insert(0, new ListItem("Select Screen Test",0))
Here is the error
******************************************************************************************************************
Specified argument was out of the range of valid values. Parameter name:
value
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument
was out of the range of valid values. Parameter name: value
Source Error:
Line 68: ScreenTest.DataValueField="ScreenTemplateMasterID"
Line 69: ScreenTest.DataTextField= "ScreenName"
Line 70: ScreenTest.databind()
<------- The error
Line 71: ScreenTest.Items.Insert(0, new ListItem("Select Screen
Test",""))
Line 72:
********************************************************************************************************************
Here is the trace of the DataReader Just before (Normally this is not there
as it would empty the reader)
ScreenName = Adminstrative Assistant
ScreenTemplateMasterID = 2
ScreenName = Network Analyst
ScreenTemplateMasterID = 1
ScreenName = Sales Clerk
ScreenTemplateMasterID = 4
ScreenName = Sales Manager
ScreenTemplateMasterID = 3
I assume the error is on the ScreenTemplateMasterID, but I don't see any
illegal values there.
What could have caused this?
Thanks,
Tom
<aspropDownList ID="ScreenTest" runat="server" />
Here is the code:
ScreenTest.DataSource=objCmd.ExecuteReader
ScreenTest.DataValueField="ScreenTemplateMasterID"
ScreenTest.DataTextField= "ScreenName"
ScreenTest.databind()
ScreenTest.Items.Insert(0, new ListItem("Select Screen Test",0))
Here is the error
******************************************************************************************************************
Specified argument was out of the range of valid values. Parameter name:
value
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument
was out of the range of valid values. Parameter name: value
Source Error:
Line 68: ScreenTest.DataValueField="ScreenTemplateMasterID"
Line 69: ScreenTest.DataTextField= "ScreenName"
Line 70: ScreenTest.databind()
<------- The error
Line 71: ScreenTest.Items.Insert(0, new ListItem("Select Screen
Test",""))
Line 72:
********************************************************************************************************************
Here is the trace of the DataReader Just before (Normally this is not there
as it would empty the reader)
ScreenName = Adminstrative Assistant
ScreenTemplateMasterID = 2
ScreenName = Network Analyst
ScreenTemplateMasterID = 1
ScreenName = Sales Clerk
ScreenTemplateMasterID = 4
ScreenName = Sales Manager
ScreenTemplateMasterID = 3
I assume the error is on the ScreenTemplateMasterID, but I don't see any
illegal values there.
What could have caused this?
Thanks,
Tom