troubleshooting Question

LinkButton - OnClientClick inside a gridview template with Bind(bountData)

Avatar of EchoBinary
EchoBinaryFlag for United States of America asked on
ASP.NET
6 Comments1 Solution18795 ViewsLast Modified:
Ok I have a gridview that uses TemplateFields:

                                    <asp:TemplateField HeaderText="Description">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbDescription" OnClientClick='popup(''drilldown.aspx?<%# Bind("Description") %>'', '''');return false;' runat="server" Text='<%# Bind("Description") %>' ForeColor="Black" Font-Underline="false" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Emer.">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbEmer" runat="server" OnClick="gvProjects_lbClick" Text='<%# Bind("Emergency", "{0:c}") %>' ForeColor="Black" Font-Underline="false" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
============================
The LinkButton for Emer. works just fine

the Linkbutton in Description does not work:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The server tag is not well formed.

Source Error:


Line 129:                                    <asp:TemplateField HeaderText="Description">
Line 130:                                        <ItemTemplate>
Line 131:                                            <asp:LinkButton ID="lbDescription" OnClientClick='popup(''drilldown.aspx'', '<%# Bind("Description") %>');return false;' runat="server" Text='<%# Bind("Description") %>' ForeColor="Black" Font-Underline="false" />
Line 132:                                        </ItemTemplate>
Line 133:                                    </asp:TemplateField>

=================

the end goal is to make the each cell in the gridview clickable.
once clicked they make a popup window that goes to an aspx page with a unique querystring based on what linkbutton they clicked on in the gridview.

so the querystring would be different across cells and rows based on the columnname and value of the cell...  

any suggestions? please :)
ASKER CERTIFIED SOLUTION
valkyrie_nc

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros