score:1
Accepted answer
Page_Load
occurs before the selected index is set during postback. Try moving your second set of databinding code to a more appropriate place - maybe in the event handler that ddlCountry
will be invoking (SelectedIndexChanged
?)
There certainly seem to be a lot of hits on Google for "page_load SelectedValue", which all tend to indicate the value cannot be accessed during Page_Load
.
More questions
- Wrong value from DropDownList, SQL Server
- How to get the next identity value from SQL Server
- Find max value and show corresponding value from different field in SQL server
- Return value from SQL Server Insert command using c#
- Convert text value in SQL Server from UTF8 to ISO 8859-1
- How can I get a list of element names from an XML value in SQL Server
- Selecting null value from XML in SQL Server
- Milliseconds wrong when converting from XML to SQL Server datetime
- Can I insert a large text value into SQL Server from ASP.net without having the whole file in memory on the webserver?
- return value at a position from STRING_SPLIT in SQL Server 2016
- Stop Access from using wrong identity when appending to linked table on SQL server
- How can I get the return value from Sql Server system message?
- Return value from function in SQL Server
- How to load data in Excel from SQL Server when one of the cells have to accept value more 255 characters
- Calling SQL Server Stored Procedure using PHP PDO from Lumen for return value gives syntax error
- SQL Server 2008 - How do I add a constraint that prevents the same value from appearing in both Column A and Column B?
- Read value from a complex XML structure using SQL Server
- SQL Server : Calculate STArea from Geometry value
- SQL Server - CTE Recursive SUM Value From Different Table
- Cross Apply to get child parent value from Xml in SQL Server
- How to get Identity value from SQL server after insert record
- insert varbinary value from hex literal in Microsoft SQL Server
- SQL Server - get next value from sequence without advancing the current_value
- Safely get next SQL Server sequence value from .NET
- SQL Server 2000 Query of total value and value from max date
- Get value from array in JSON in SQL Server
- How to insert row into a table by select column name and value from another table in SQL Server
- Extracting a value from an XML column in SQL Server
- Sql Server - For XML - Get null value from element
- VBScript - Retrieving a Scalar Value From a Stored Procedure on SQL Server 2008
More questions with similar tag
- OData HTTP400 Timeout Error
- Why wouldn't we use INNER JOIN on a Table Valued Function?
- If then operator in where clause of sql statement
- SQL Server -- updating the `sys.*` tables and not just reading them
- If Statement in Table valued Function
- How I can transform a stored procedure to a view?
- Multiple condition update statement in SQL Server
- Why SELECT shows Update lock in deadlock graph
- SQL Server Express 2012 SocketException with Unity
- how to count how many words when using a join?
- Getting a list of available SQI servers
- Joining a list of values with table rows in SQL
- Entity Framework Where(Func<Car, bool>) clause not going to server
- SQL Server not accepting YYYY-MM-DD
- SSRS Sub-Report Won't Load Until Refresh
- Way to call SQL stored procedure purely dynamically (dynamic parameters in sp_executesql)?
- Azure SQL - Automatic Tuning with Geo-replication - Server in unspecified state and query store has reached its capacity limit
- Best practices for moving data using triggers in SQL Server 2000
- Default Values (of C# variables) Issue in LINQ to SQL Update
- Strange SaveChanges behavior in Entity Framework and SQL Server
- Transponse data from multiple rows into 1 Column
- SQL query to get the employee name and their manager name from the same table
- Avg of a Sum in one query
- attempting a replace function on sql but with wildcards
- Logic to check if exact ids (3+ records) are present in a group in SQL Server
- Safe DateTime in a T-SQL INSERT statement
- Encoding option CODEPAGE not working for OPENROWSET in MSSQL Server
- SQL to find records by ID that have value of only zero in separate column
- Query SQL Table And Store Results In Array
- Get columns name from a table in database
Source:
stackoverflow.com