fmardani
Programmer
- Jul 24, 2003
- 152
Hi,
I am using a web datagrid which is populated with data.
There are several columns on this grid.
The last one is a template column which is used so that when you hover over it it builds a string and retrieves the values of two of the columns in the grid.
There are several records.
Most of the records have all the fields populated but a few do not.
This datagrid is in a web uservontrol which is under a folder called UserControl.
When I hover over a record which has all the fields populated, at the bottom it shows the correct path to go to if it is clicked.
The problem is that if I hover over a record which does not have all the fields populated then it wants to go to the usercontrol folder and ofcourse the default.aspx is not there but out side it.
This is what I am using to build the link. I think the problem is to do with putting / or . before the default.aspx
Can you help?
Hope this is clear. Thanks
<asp:TemplateColumn HeaderText="Details">
<ItemTemplate>
<asp:HyperLink runat="server" Text="view" NavigateUrl='<%# "default.aspx?id=" + DataBinder.Eval(Container, "DataItem.nID") + "&DateOfData=" + DataBinder.Eval(Container, "DataItem.tDateOfData") %>' >
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
I am using a web datagrid which is populated with data.
There are several columns on this grid.
The last one is a template column which is used so that when you hover over it it builds a string and retrieves the values of two of the columns in the grid.
There are several records.
Most of the records have all the fields populated but a few do not.
This datagrid is in a web uservontrol which is under a folder called UserControl.
When I hover over a record which has all the fields populated, at the bottom it shows the correct path to go to if it is clicked.
The problem is that if I hover over a record which does not have all the fields populated then it wants to go to the usercontrol folder and ofcourse the default.aspx is not there but out side it.
This is what I am using to build the link. I think the problem is to do with putting / or . before the default.aspx
Can you help?
Hope this is clear. Thanks
<asp:TemplateColumn HeaderText="Details">
<ItemTemplate>
<asp:HyperLink runat="server" Text="view" NavigateUrl='<%# "default.aspx?id=" + DataBinder.Eval(Container, "DataItem.nID") + "&DateOfData=" + DataBinder.Eval(Container, "DataItem.tDateOfData") %>' >
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>