datagrid linkbutton event and firefox

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top