N
Nick
Hi all
I am hoping that someone would respond to what I am calling a puzzle: obtain the postback value of dynamic hidden control
I am posting a short version of the code, thx for your help
public class AccountSummaryInfo : System.Web.UI.WebControls.WebControl, IPostBackDataHandle
{
#region Constructor/Deconstructo
public AccountSummaryInfo(string StrAccountNum
{
InitializeDataGrid()
BuildControls()
}//End constructo
#endregio
private void BuildControls(
{
protected virtual void Click(object sender, System.EventArgs e)
{
Button btn = (Button)sender
if (btn.CommandName.Equals("Previous")
{ //Code her
_strKey = “Some Valueâ€
Page.Server.Transfer(cPAGENAME,true)
else if (btn.CommandName.Equals("Next")
//Code her
_strKey = “Some Other Valueâ€
Page.Server.Transfer(cPAGENAME,true)
}//End Clic
private void InitializeDataGrid()
}//End DefineDataGrid(
private void GetData(string _strCommand
{
_strKey = “value Aâ€
_strPreviousKey = “value 1â€
}//End GetData(
private void CreateGrid(string[] aList
{
}//End CreateGrid()
protected override void OnPreRender(EventArgs e)
Controls.Add(new LiteralControl("<input type='hidden' name='Key' value='" + _strKey + "'>"))
Controls.Add(new LiteralControl("<input type='hidden' name='PreviousKey' value='" + _strPreviousKey + "'>"))
base.OnPreRender(e)
}//End OnPreRender(
protected override void OnInit(EventArgs e)
GetData(strCommand)
UpdateGrid();
base.OnInit(e)
}//End OnInit(
private void UpdateGrid(
}//End clas
}//end namespac
I am hoping that someone would respond to what I am calling a puzzle: obtain the postback value of dynamic hidden control
I am posting a short version of the code, thx for your help
public class AccountSummaryInfo : System.Web.UI.WebControls.WebControl, IPostBackDataHandle
{
#region Constructor/Deconstructo
public AccountSummaryInfo(string StrAccountNum
{
InitializeDataGrid()
BuildControls()
}//End constructo
#endregio
private void BuildControls(
{
protected virtual void Click(object sender, System.EventArgs e)
{
Button btn = (Button)sender
if (btn.CommandName.Equals("Previous")
{ //Code her
_strKey = “Some Valueâ€
Page.Server.Transfer(cPAGENAME,true)
else if (btn.CommandName.Equals("Next")
//Code her
_strKey = “Some Other Valueâ€
Page.Server.Transfer(cPAGENAME,true)
}//End Clic
private void InitializeDataGrid()
}//End DefineDataGrid(
private void GetData(string _strCommand
{
_strKey = “value Aâ€
_strPreviousKey = “value 1â€
}//End GetData(
private void CreateGrid(string[] aList
{
}//End CreateGrid()
protected override void OnPreRender(EventArgs e)
Controls.Add(new LiteralControl("<input type='hidden' name='Key' value='" + _strKey + "'>"))
Controls.Add(new LiteralControl("<input type='hidden' name='PreviousKey' value='" + _strPreviousKey + "'>"))
base.OnPreRender(e)
}//End OnPreRender(
protected override void OnInit(EventArgs e)
GetData(strCommand)
UpdateGrid();
base.OnInit(e)
}//End OnInit(
private void UpdateGrid(
}//End clas
}//end namespac