Greetings to all,
Here is a snippet from my code:
start codeprotected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp", "<script>loadAdditionalInfoDialog(info1)</script>",false);
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp2", "<script>loadAdditionalInfoDialog(info2)</script>",false);
}
end of code
The loadAdditionalInfoDialog()
function triggers a small window where users can input information and click "OK" to move to the next step.
However, when I click on Button1, I only see the second RegisterStartupScript
in action, meaning loadAdditionalInfoDialog(info2)
works but I can't enter info for the first one, loadAdditionalInfoDialog(info1)
.
I am seeking a solution where I can input info for loadAdditionalInfoDialog(info1)
first upon clicking Button1, followed by entering info for loadAdditionalInfoDialog(info2)
.
Many thanks for any help.
Button1_Click is primarily for testing purposes. In reality, I will trigger loadAdditionalInfoDialog() when receiving data in a Repeater:
protected void btnRedeemAll_Click(object sender, EventArgs e)
{
foreach( RepeaterItem itm in repGiftResults.Items )
{
/*
code to gather parameters
*/
if (pr.AdditionalFieldsEnabled == true)
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "temp", "<script>loadAdditionalInfoDialog(1," + pr.ID + "," + giftId + ",'" + txtQty.ClientID + "'," + tokenId + ")</script>", false);
}
}
}
Thus, calling loadAdditonalInfoDialog() a second time upon clicking "OK" is complicated due to the need for numerous parameters in the repeater.