kdeutsch
asked on
Change Href link from page to a open table
What I would like the below link in my datagrid grid to do is actually present a table in front of the grid instead of opening up another page with information on it. I want to use a table inside a div and put it on top with information inside it. How can I change the link so that its a click event instead of a href tag to another page.
<asp:TemplateColumn HeaderText="Person">
<ItemTemplate>
<a href="EditACN.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "intId") %>" target=_blank>
<%# DataBinder.Eval(Container.DataItem, "strFullName") %></a>
</ItemTemplate>
</asp:TemplateColumn>
In the template, remove the <a> tag and put in a button or image button. The rest should do the same. That will give you a click event that you can trap.
change to
target=self
target=self
or
Target="_parent"
Target="_parent"
target=_parent
ASKER
all,
Ok I figured how I was doing is not the best way, I need the Href to change to a linkbutton which I can go after but how can i assign the name and data to pass thorought he click event. so Otherwise the linkebutton text should be strFullName and on the lcikc event it should pass the intId to the code behind,
So I guess how do i put this into the linkbutton, instead of the href.
<asp:TemplateColumn HeaderText="Person">
<ItemTemplate>
<asp:LinkButton id="lnkPerson" Runat="server" CommandName="Table"></asp: LinkButton >
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Person">
<ItemTemplate>
<a href="EditACN.aspx?ID=<%# DataBinder.Eval(Container. DataItem, "intId") %>" target=_self>
<%# DataBinder.Eval(Container. DataItem, "strFullName") %></a>
</ItemTemplate>
</asp:TemplateColumn>
Ok I figured how I was doing is not the best way, I need the Href to change to a linkbutton which I can go after but how can i assign the name and data to pass thorought he click event. so Otherwise the linkebutton text should be strFullName and on the lcikc event it should pass the intId to the code behind,
So I guess how do i put this into the linkbutton, instead of the href.
<asp:TemplateColumn HeaderText="Person">
<ItemTemplate>
<asp:LinkButton id="lnkPerson" Runat="server" CommandName="Table"></asp:
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Person">
<ItemTemplate>
<a href="EditACN.aspx?ID=<%# DataBinder.Eval(Container.
<%# DataBinder.Eval(Container.
</ItemTemplate>
</asp:TemplateColumn>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks