Thanks for the help guys. Here is what I ended up doing in hopes it can help others:
Then in the GridView Row Data Bound eventHTML Code:If Me.XMLUpload.HasFile = False Then Response.Write("<script>alert('You must select a file to load.')</Script>") Exit Sub End If If Mid(Me.XMLUpload.PostedFile.FileName, Len(Me.XMLUpload.PostedFile.FileName) - 3, Len(Me.XMLUpload.PostedFile.FileName)) <> ".xml" Then Response.Write("<script>alert('Only XML data files can be loaded.')</Script>") Exit Sub End If 'Get the next sequence number to load into the requests table Dim conSeqNo As New OracleClient.OracleConnection("myconn string") Dim cmdSeqNo As New OracleClient.OracleCommand("SELECT RMANUMBER.NEXTVAL FROM DUAL", conSeqNo) conSeqNo.Open() Dim rdrSeqNo As OracleClient.OracleDataReader = cmdSeqNo.ExecuteReader(CommandBehavior.CloseConnection) While rdrSeqNo.Read Session("RequestID") = rdrSeqNo.GetValue(0) End While 'Implicitly closes the connection because CommandBehaviour.CloseConnection was specified rdrSeqNo.Close() 'Move the file to the server If Me.XMLUpload.HasFile Then Me.XMLUpload.SaveAs(Server.MapPath("~/XMLData/" & Session("RequestID") & ".xml")) End If 'Display the file on the screen Dim myDataSet As New DataSet() myDataSet.ReadXml(Server.MapPath("~/XMLData/" & Session("RequestID") & ".xml")) Me.GridView1.DataSource = myDataSet GridView1.DataBind() File.Delete(Server.MapPath("~/XMLData/" & Session("RequestID") & ".xml")) Me.GridView1.Visible = False
So far it works like a charm. Thanks again for you help.HTML Code:If e.Row.RowType = DataControlRowType.DataRow Then Me.txtCustomer.Text = e.Row.Cells(0).Text End If




Reply With Quote