G
Guest
Are there any known restrictions on where Page.RegisterHiddenField will work? It seems to only work in the Page_Load event...My code below fails to render it in the page's source
I would like these values to be used by some client-side javascript. If I can't use the register methods here, how can I make the data grid's clicked values availble in the Page_Load's Postback? Thanks, Dave
private void dgGrid_ItemCommand(Object src, DataGridCommandEventArgs e
if (e.Item.ItemIndex >= 0)
//--Get the posted values from the datagrid..
dgPortfolio.SelectedIndex = e.Item.ItemIndex
string sId= dgGrid.DataKeys[e.Item.ItemIndex].ToString()
string sName= dgGrid.SelectedItem.Cells[2].Text
Page.RegisterHiddenField("Id", sId)
Page.RegisterHiddenField("Name", sName)
}
I would like these values to be used by some client-side javascript. If I can't use the register methods here, how can I make the data grid's clicked values availble in the Page_Load's Postback? Thanks, Dave
private void dgGrid_ItemCommand(Object src, DataGridCommandEventArgs e
if (e.Item.ItemIndex >= 0)
//--Get the posted values from the datagrid..
dgPortfolio.SelectedIndex = e.Item.ItemIndex
string sId= dgGrid.DataKeys[e.Item.ItemIndex].ToString()
string sName= dgGrid.SelectedItem.Cells[2].Text
Page.RegisterHiddenField("Id", sId)
Page.RegisterHiddenField("Name", sName)
}