I have tried several different approaches .
SOMEONE PLEASE sow me how to sort on template field with a calculated value.
Basically i have half the data i need in the DB and the other half comes from textbox1.text
I take the text in textbox1 and pass it along with a value from the DB (Orig) to a function that returns miles.
<asp:Label ID="Label1" runat="server" Text='<%# miles(Eval("Orig"), textbox1.text) %>'>
Whit the above method everything displays correctly but i cannot sort on that column .
I also tried using the miles() function in my select statement for my datasource but that was a nightmare and couldn't get that to work i either got "undeclared function "miles()" or when i fixed that i got "orig" not declared.
Sorry code is so jumbled , entire code is below:
<%@ Page Title="" Language="VB" MasterPageFile="~/Secure/MasterPage.master" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>
View Complete Post