- I have a list with runat = server
- Items are added to this list on the client side using javascript
- I would like to get server side items at the click of a button
The problem is the server side click handler, I do not see new items added to the list. Only those items that were on the load_page are displayed. How to do what I want to do
Change 1
My code is like this
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (ViewState["gameID"] == null)
{
}
btnSomeButton.Attributes.Add("onclick", "aJavaScriptFunction");
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
ListItemCollection x = ListBoxRanks.Items;
}
source
share