I think the Querystring is my best bet with a details view on another .aspx page. I've had a devil of a time finding any textbook examples or web resources for embedding SELECT-FROM-WHERE type sql querying to choose a particular node of the XML file and make the node's data accessible to the new .aspx page through a querystring. I've seen some reference to the "FOR XML AUTO" phrase but I'm not sure if that is on the right track (?). Any examples in websites would be very helpful. This is not part of my job but I just personally want to learn how to query into XML files to grab "records/nodes", edit them, delete, etc. I use vb.net and know nothing of C# (us vbers are "parenthetically challenged", pardon my humor!) Thanks Cerebus... you're the best
On Dec 16, 11:22 am, Cerebrus <[email protected]> wrote: > This sounds like a typical Master-Details situation spanning across > pages. In such a condition, my solution would be to pass the ID of the > selected record in the Datagrid to the new page via the Querystring. > In the new page load a FormView / DetailsView andselectthe data > based on a where clause that matches the passed ID. > > This is of course a Non-LINQsolution (Sorry, BB, couldn't > resist ! :P) > > On Dec 15, 10:08 pm, Brock <[email protected]> wrote: > > > > > I have an .aspx page that is successfully (I use Visual Web Developer > > 2008) reading an XML file and displaying the records on a datagrid > > using: > > > <script runat="server"> > > Private Function MakeDataView() as DataView > > Dim myDataSet As New DataSet() > > myDataSet.ReadXml(Server.MapPath("history.xml")) > > Dim view As DataView = New DataView(myDataSet.Tables(0)) > > view.AllowDelete = False > > view.AllowEdit = False > > view.AllowNew = False > > Return view > > End Function > > > Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) > > Dim view as DataView = MakeDataView() > > dgHistory.DataSource = view > > dgHistory.AllowSorting = True > > dgHistory.DataBind() > > Label1.Text = DateAndTime.Now.ToLongTimeString > > End Sub > > </script> > > > Can anyone give me some clues as to how to code another .aspx page to > > query the XML using XPathNavigator (or something else) tools to find a > > specific node > > based on an ID number? The goal is to have the user be able to click > > on an edit button and it will launch an edit page passing that record > > to the edit page. > > > I really need a separate edit page because the number of fields is > > over 50 and the datagrid in the base form only displays about 4 > > fields.- Hide quoted text - > > - Show quoted text -
