D
dei8fan
I inherited some code with a datagrid being populated at run time (ASP.NET C#
page), and each row in the datagrid has a linkbutton. In IE, clicking on the
linkbutton displays the proper piece of content, in an IFRAME when the page
reloads.
In Firefox, I get a blank page. I can see HTML if I View Source, but it's
not the same HTML I get when using IE. It appears the event for the click on
the linkbutton is not running when using Firefox.
The datagrid settings:
AutoGenerateColumns = false
Enabled = true
EnableViewState = true
private void HelpChoicesDataGrid_ItemCommand(object sender,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "ViewHelp")
{
e.Item.BackColor = Color.DarkGray;
HyperLinkToSelection(Convert.ToString(e.Item.ItemIndex));
}
} // End HelpChoicesDataGrid_ItemCommand
protected void HyperLinkToSelection(string bookmarkIndex)
{
System.Text.StringBuilder jScript = new System.Text.StringBuilder();
jScript.Append("<script language=\"JavaScript\">");
jScript.Append("location.href=\"#");
jScript.Append(bookmarkIndex);
jScript.Append("\";");
jScript.Append("</script>");
this.RegisterClientScriptBlock("Bookmark", jScript.ToString());
} // End HyperLinkToSelection
Any ideas?
Thanks,
Dennis
page), and each row in the datagrid has a linkbutton. In IE, clicking on the
linkbutton displays the proper piece of content, in an IFRAME when the page
reloads.
In Firefox, I get a blank page. I can see HTML if I View Source, but it's
not the same HTML I get when using IE. It appears the event for the click on
the linkbutton is not running when using Firefox.
The datagrid settings:
AutoGenerateColumns = false
Enabled = true
EnableViewState = true
private void HelpChoicesDataGrid_ItemCommand(object sender,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "ViewHelp")
{
e.Item.BackColor = Color.DarkGray;
HyperLinkToSelection(Convert.ToString(e.Item.ItemIndex));
}
} // End HelpChoicesDataGrid_ItemCommand
protected void HyperLinkToSelection(string bookmarkIndex)
{
System.Text.StringBuilder jScript = new System.Text.StringBuilder();
jScript.Append("<script language=\"JavaScript\">");
jScript.Append("location.href=\"#");
jScript.Append(bookmarkIndex);
jScript.Append("\";");
jScript.Append("</script>");
this.RegisterClientScriptBlock("Bookmark", jScript.ToString());
} // End HyperLinkToSelection
Any ideas?
Thanks,
Dennis