private static string BuildInsertWithDefaultsUrl(LinqDataSource datasource) { RouteValueDictionary routeValues = BuildRoutesFromDatasource(datasource); MetaTable table = datasource.GetTable(); return(table.GetActionPath(PageAction.Insert, routeValues)); }
public void DynamicDataExtensions_GetTable_Test3() { HttpContext.Current = new HttpContext(new FakeWorkerRequest()); var dds = new LinqDataSource(); dds.GetTable(); }
public static void RegisterListDetailsDefaults(LinqDataSource dataSource, DetailsView detailsView) { MetaTable table = dataSource.GetTable(); detailsView.DataBound += delegate(object sender, EventArgs e) { //In the combined version we stay on the same page and must pull values from the datasource if (detailsView.CurrentMode == DetailsViewMode.Insert) { SetDefaultInsertControlValues(table, detailsView, BuildRoutesFromDatasource(dataSource)); } }; }