B
Brock
I didn't know a better way to label my subject! Sorry guys... I have
an ASP.net Datagrid. What I'll be using this for is for a user to
choose an employee record on the datagrid then hit the detail button
or link and launch a new window showing the details for that specific
employee. The new window will have to pick up the Employee ID and
populate the new ASP.net window. Unfortunately I'm using .net
Framework 1.1 so my user tools are limited. So I'm thinking why not
just use Javascript like other people have told me.
I've tried two ASP ideas of which I couldn't get rid of the errors:
1):
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink ID="ViewDetails" Runat="server" NavigateUrl='<%#
Eval("id","Details.aspx?id={0}") %>'>Details</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
2):
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="MainDepartment.aspx.vb"
Inherits="Forsyth.HR_ReportingTool.UI.MainDepartment" %>
<FORM id="Form1" method="post" runat="server">
<asp:datagrid id="dgEmployees" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="ViewDetails" CommandArgument='%# Eval("id") %'
Runat="server" OnCommand="ViewDetails">Details</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid></FORM>
</BODY>
</HTML>
Note that in this solution I'm using a "code-behind" file containing:
Protected Sub ViewDetails(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.CommandEventArgs)
Response.Redirect("Details.aspx?id=" & e.CommandArgument.ToString())
End Sub
an ASP.net Datagrid. What I'll be using this for is for a user to
choose an employee record on the datagrid then hit the detail button
or link and launch a new window showing the details for that specific
employee. The new window will have to pick up the Employee ID and
populate the new ASP.net window. Unfortunately I'm using .net
Framework 1.1 so my user tools are limited. So I'm thinking why not
just use Javascript like other people have told me.
I've tried two ASP ideas of which I couldn't get rid of the errors:
1):
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink ID="ViewDetails" Runat="server" NavigateUrl='<%#
Eval("id","Details.aspx?id={0}") %>'>Details</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
2):
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="MainDepartment.aspx.vb"
Inherits="Forsyth.HR_ReportingTool.UI.MainDepartment" %>
<FORM id="Form1" method="post" runat="server">
<asp:datagrid id="dgEmployees" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="ViewDetails" CommandArgument='%# Eval("id") %'
Runat="server" OnCommand="ViewDetails">Details</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid></FORM>
</BODY>
</HTML>
Note that in this solution I'm using a "code-behind" file containing:
Protected Sub ViewDetails(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.CommandEventArgs)
Response.Redirect("Details.aspx?id=" & e.CommandArgument.ToString())
End Sub